home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / ibm1 / do101j2.arj / GETS.SCR < prev    next >
Text File  |  1991-12-29  |  2KB  |  48 lines

  1. .pg wi full clr cy
  2.     COMMAND NAME»gray«: »%t« GetString »ye«
  3.  
  4.     /GETS[TRING] {variable} {default} {Prompt} [[{length}] UC]
  5. /cw
  6.     Gets a string from the user and assigns it to »cy«{variable}»#« if
  7.     »bo«<Enter>»#« pressed with no string entered, the »cy«{default}»#« is
  8.     used.
  9. .pg
  10.  
  11.     »wh«{variable}»#«     is a string variable name.
  12.  
  13.     »wh«{default}»#«      is a string variable holding the default value
  14.                    that will be used if the »bo«<Enter>»#« key only is
  15.                    pressed.
  16. .pg
  17.  
  18.     »wh«{Prompt}»#«       The prompt that will be displayed for the
  19.                    user. If the »cy«{prompt}»#« contains »ma«spaces»#« or
  20.                    »ma«commas»#«, it must be enclosed in quote marks.
  21.  
  22.     »wh«{length}»#«       The maximum length of the string that will be
  23.                    used. If it is zero ("»ye«0»#«") or null then the
  24.                    maximum string of »ye«254»#« characters will be
  25.                    accepted.
  26.  
  27.     »wh«UC»#«             Optional token that indicates that the
  28.                    response should be set to »ye«all caps»#«.
  29.  
  30. .pg clr
  31.  
  32.     Here are some examples with results displayed.  »cy«{default}»#« is set
  33.     to "»ye«NONE»#«".  Press »bo«<enter>»#« to execute each command.
  34.  
  35. /SET default NONE
  36. |/GETS Answer Default "What is your first name? "
  37. |Your first name is: »ma«%Answer»#«
  38. .reset
  39.  
  40. |/GETS Answer Default "What is your zip code? " 5
  41. |Your zip code is: »ma«%Answer»#«
  42. .reset
  43.  
  44. |/GETS Answer Default "What is your street address? " 32 UC
  45. |Address: »ma«%Answer»#«
  46.  
  47. /ENDEXEC CLEAR
  48.