[m-users.] GitHub release "aio" -- ANSI I/O support.
Sean Charles (emacstheviking)
objitsu at gmail.com
Sat Aug 24 23:06:38 AEST 2024
Understood!
My code is now:
:- mutable(astate, aio_state, aio_state(yes, no), ground, [attach_to_io_state]).
enable_colours(Mode, !IO) :-
get_astate(aio_state(_, Quiet), !IO),
set_astate(aio_state(Mode, Quiet), !IO).
and the little test case of it:
main(!IO) :-
aio.format("@bp: @tk: @cr: @:) @:| @:( \n", [], !IO),
enable_colours(no, !IO),
aio.format("@bp: @tk: @cr: @:) @:| @:( \n", [], !IO).
That's a much nicer way and thanks for pointing it out to me, again, my brain isn't that good lately.
Thanks,
Sean.
> On 24 Aug 2024, at 13:27, Volker Wysk <post at volker-wysk.de> wrote:
>
> attach_to_io_state
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20240824/8dcd7921/attachment.html>
More information about the users
mailing list