[m-users.] Displaying a list of type integer

Tomas By tomas at basun.net
Sat Dec 6 04:31:23 AEDT 2014


Trying again...

Several ways:

1. io.print(List,!IO)

2. io.write_string(List,",",io.print,!IO)

3. io.write_string(string(List),!IO)

There is also a useful list->string conversion function that I cannot
remember the name of.

Generally, you can just say print(X) and get a string. That can be use in
combination with format, as in:

  io.format("my list = %s\n",[s(string(List))],!IO)

/Tomas



On Fri, December 5, 2014 18:21, Delmas Buckley wrote:
> How do I display a list of type integer? I'm trying
>
> io.write_list(My_list(integer), ",", OutputPred, !IO)
>
> assuming by separator string it's asking what I want to see displayed, and
> I select the comma. What is OutputPred? Am I supposed to be converting
> each
> integer to a string? The My_list will initially always have at least one
> integer member.
>
> Any help appreciated,
> Robert Buckley
> _______________________________________________
> users mailing list
> users at lists.mercurylang.org
> https://www.mercurylang.org/lists/listinfo/users
>





More information about the users mailing list