[Oberon] literal value for end of line character?

Thomas Frey thomas.frey at alumni.ethz.ch
Sun Feb 4 01:46:34 MET 2007


> I wish to test a character to see if it is equal to the end-of line
> character. (In Java this would be c == '\n'). How does one do this in
> Oberon?  I tried
>
> ch = DX
>
> where D is the hexadecimal value for carriage return, but I got a
> compiler error.

Try ch = 0DX.
All (hexadecimal-)numbers need to start with "0".."9". The compiler
thinks DX is a name, 0DX will be recognized as CHR(13).

--Thomas


More information about the Oberon mailing list