[Oberon] Re: N-O Scanner structure confusing ?

thoken at gmail.com thoken at gmail.com
Sun Feb 18 01:40:00 MET 2007


On 15 Feb 2007, Chris Glur <easlab at absamail.co.za> wrote:
>
>  [...]
> My present query is:
> why don't they write in a higher-level style eg.
>    IF CaretPostn = NIL THEN Error('Caret not set');
>    Scan1stTkn(S); // which also inits Scanner;
>    WHILE condition DO GetToken(S); DoStuff END;

No need at system library level:
Scanning is an input operation.
The caret position is mainly an output parameter
(keyboard writes at ..., text is copied to ..., mark position at ...)
and used as second-hand-input-parameter
only when selection alone is not sufficient

regards, Thomas

>  [...]


More information about the Oberon mailing list