gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode I/O for GM2


From: Gaius Mulley
Subject: Re: Unicode I/O for GM2
Date: Tue, 26 Mar 2024 11:59:55 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Benjamin Kowarsch <trijezdci@gmail.com> writes:

> On Tue, 26 Mar 2024 at 09:40, Gaius Mulley wrote:
>
>  yes single byte character i/o, I've just added some test code to verify
>  this behaviour, which will appear in gcc/testsuite/gm2/pimlib/run/pass
>
> Thanks for the clarification.
>
> To ascertain, there is no way to write a multi-byte char to the console using 
> the GM2 provided IO libraries?

It can be done but it is not pretty :-), but the underlying mechanism works

$ cat eurosym.mod
MODULE eurosym ;

FROM StdIO IMPORT Write ;
FROM StrIO IMPORT WriteString, WriteLn ;


PROCEDURE Euros ;
BEGIN
   Write (CHR (0E2H)) ;
   Write (CHR (082H)) ;
   Write (CHR (0ACH))
END Euros ;


BEGIN
   WriteString ('the european currency is measured in ') ; Euros ; WriteLn
END eurosym.

$ gm2 eurosym.mod
$ ./a.out
the european currency is measured in €

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]