[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
- Unicode I/O for GM2, Alice Osako, 2024/03/23
- Re: Unicode I/O for GM2, Benjamin Kowarsch, 2024/03/24
- Re: Unicode I/O for GM2, Alice Osako, 2024/03/24
- Re: Unicode I/O for GM2, Benjamin Kowarsch, 2024/03/25
- Re: Unicode I/O for GM2, Alice Osako, 2024/03/25
- Re: Unicode I/O for GM2, Gaius Mulley, 2024/03/25
- Re: Unicode I/O for GM2, Benjamin Kowarsch, 2024/03/25
- Re: Unicode I/O for GM2,
Gaius Mulley <=
- Re: Unicode I/O for GM2, Benjamin Kowarsch, 2024/03/26
- Re: Unicode I/O for GM2, Gaius Mulley, 2024/03/26
- Re: Unicode I/O for GM2, Benjamin Kowarsch, 2024/03/26
- Re: Unicode I/O for GM2, Gaius Mulley, 2024/03/26
- Re: Unicode I/O for GM2, Alice Osako, 2024/03/26
- Re: Unicode I/O for GM2, Gaius Mulley, 2024/03/26
- M2Unit? (was Re: Unicode I/O for GM2), Alice Osako, 2024/03/27
- Modula-2 generics, exceptions, and optional parameters - how widely supported?, Alice Osako, 2024/03/27
- Re: Modula-2 generics, exceptions, and optional parameters - how widely supported?, Benjamin Kowarsch, 2024/03/28
- Re: Modula-2 generics, exceptions, and optional parameters - how widely supported?, Gaius Mulley, 2024/03/28