Setting the scanning subject in Icon |
|
When the ``e1 ? e2'' construct
is used, not only is e1 established as the implicit
scanning subject for the evaluation of expression e2,
but there is also the idea of a current position
within that subject.
Here is how an expression of the form
``e1 ? e2'' is evaluated:
&subject''.
&pos'' is
set to 1. This variable tracks the current
scan position.
match()''
inside expression e2,
you can implicitly refer to the subject by omitting
the second argument.
|
John Shipman, john@nmt.edu
Last updated: 1996/01/06 21:12:57 UT URL: http://www.nmt.edu/tcc/help/lang/icon/subject.html |
|