Print "\n" as carriege return in Print method

33 views
Skip to first unread message

Xan

unread,
May 7, 2012, 11:30:41 AM5/7/12
to Alore Language
Hi,

If I run Prin("\n") I get "\n", instead of carriege return (intro).
How can I get this behaviour?

Thanks in advance,
Xan.

Jukka Lehtosalo

unread,
May 8, 2012, 4:23:21 AM5/8/12
to alor...@googlegroups.com
On Mon, May 7, 2012 at 4:30 PM, Xan <xanc...@gmail.com> wrote:
> Hi,
>
> If I run Prin("\n") I get "\n", instead of carriege return (intro).
> How can I get this behaviour?

Hi,

You can use Print(Newline). Hint: Newline is platform-specific. You
can use Print(Repr(Newline)) so see how Newline is represented on your
system.

More info:

LF is a constant that refers to the line feed character (it's the same
as \n in Java and Python). CR is a constant that refers to the
carriage return character (\r in Python/Java). The constant Newline
refers to the platform-specific line ending (LF in Linux/Mac OS and
CR+LF in Windows).

In Alore streams and files don't have separate binary and text modes.

Jukka

> Thanks in advance,
> Xan.

Xan xan

unread,
May 8, 2012, 4:57:58 AM5/8/12
to alor...@googlegroups.com
I will try it....

Thanks,
Xan.

2012/5/8, Jukka Lehtosalo <jleht...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Alore Language" group.
> To post to this group, send email to alor...@googlegroups.com.
> To unsubscribe from this group, send email to
> alorelang+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/alorelang?hl=en.
>
>
Reply all
Reply to author
Forward
0 new messages