INCLAN: ask: Difference between revisions

From CYANA Wiki
Jump to navigation Jump to search
 
Line 7: Line 7:
Writes the string ''prompt'' to standard output, reads one line from standard input, and assigns from this line strings separated by blanks to the given ''variables''. The command is usually used for interactive input within macros. A ''prompt'' that contains blanks must be enclosed in double quotes.
Writes the string ''prompt'' to standard output, reads one line from standard input, and assigns from this line strings separated by blanks to the given ''variables''. The command is usually used for interactive input within macros. A ''prompt'' that contains blanks must be enclosed in double quotes.


  '''ask "First and last point: " begin end'''
== Examples ==
  '''First and last point:'''
 
  '''12 45'''
  ask "First and last point: " begin end
  '''print "range = $begin...$end"'''
  First and last point:
  '''range = 12...45'''
  12 45
  print "range = $begin...$end"
  range = 12...45

Latest revision as of 14:28, 13 August 2009

Synopsis

ask prompt variable ...

Description

Writes the string prompt to standard output, reads one line from standard input, and assigns from this line strings separated by blanks to the given variables. The command is usually used for interactive input within macros. A prompt that contains blanks must be enclosed in double quotes.

Examples

ask "First and last point: " begin end
First and last point:
12 45
print "range = $begin...$end"
range = 12...45