Replies: 4 comments 1 reply
-
a new line? "\n", like in C. E.g., Wr.PutText(Stdio.stdout, "hello, world!\n") Or IO.Put("hello, world!\n") |
Beta Was this translation helpful? Give feedback.
0 replies
-
On 1/10/23 22:14, Mika Nyström wrote:
a new line? "\n", like in C.
E.g.,
Wr.PutText(Stdio.stdout, "hello, world!\n")
Or
IO.Put("hello, world!\n")
Or, instead of \n, you can use Wr.EOL, which is a
TEXT constant that is OS-specific to the target that
you compile for. Thus, your same code, complied for
different targets, will produce the correct end of line
sequence for each target. On some (Windows) this
is a two-character sequence, thus a TEXT and not a
CHAR.
e.g.:
Wr.PutText(Stdio.stdout, "hello, world" & Wr.EOL)
or
Wr.PutText(Stdio.stdout, "hello, world")
Wr.PutText(Stdio.stdout, Wr.EOL)
As with most language libraries, don't forget, as I usually do,
to flush if you want to see the output immediately:
Wr.Flush(Stdio.stdout)
RTIO.i3 has some alternative stderr-putting alternatives.
…
—
Reply to this email directly, view it on GitHub <#1138 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSVZNEIJFWHZSSJ67SJJNTWRYXT5ANCNFSM6AAAAAATXRR6R4>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Ah I always wondered about Windows. I am brainwashed by Unix. Sorry, should have double-checked. |
Beta Was this translation helpful? Give feedback.
0 replies
-
As smal remark: IO.Put ("\n"); work good on OS Windows. ( It's tested with both cp866 and utf-8 code pages) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
On Pascal, there is WriteLn. What about CM3? I do not see PutLn.
Beta Was this translation helpful? Give feedback.
All reactions