Printing New Lines and other characters in the Ring programming language

Hello

In Ring, to print new line we can use the nl variable

See “Hello” + nl

or we can use multi-line literal as in the next example

See “Hello

if we want to print other characters we can use the char(nASCII) function

See char(109) + nl +    # print m
    char(77)            # print M
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s