[fpc-pascal] character escaping with ^LETTER

Frederic Da Vitoria davitofrg at gmail.com
Mon Jan 19 15:57:31 CET 2015


2015-01-19 14:17 GMT+01:00 Dmitry Boyarintsev <skalogryz.lists at gmail.com>:

> Hello,
>
> today I saw this kind of character escaping:
> var
>   a :char;
> begin
>   a:=^M; // char(13)
>   writeln(^X);  // char(24)
> end;
>
> The code of the character is derived as ord(letter)-ord('A')+1
> Not sure which pascal its inherited from... but Delphi 7 does compile it
> too.
>
> I vaguely remember it seeing before once .. and ... a lot of time ago.
>

IIRC good old Turbo Pascal had this too.

-- 
Frederic Da Vitoria
(davitof)

Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150119/41bcbc7f/attachment.html>


More information about the fpc-pascal mailing list