|
From: | Hưng Hưng |
Subject: | Re: Escape sequence in gm2 |
Date: | Tue, 24 Mar 2020 20:23:14 +0700 |
On Tue, 24 Mar 2020, 14:05:56 +0100, Hưng Hưng wrote:
> I searched the web many times but found nothing. In C we use a backsplash to
> represent newline, tab, backspace... but when I use ORD('\n'); in gm2 it always
> complain that the conststring must be have length 1, it means it only accept
> one character and doesn't understand the backsplash. Please help.
IMPORT ASCII;
then use ASCII.nl instead of ORD('\n'). Modula-2 doesn't support C like
escape sequences, at least not as characters. Implementations of e.g.
printf like routines may look at a format string, but this is not
covered by any language standard.
HTH, cheers.
l8er
manfred
[Prev in Thread] | Current Thread | [Next in Thread] |