Lesson 1 [Next]

Hello, World

Text Output

The "Hello, world" program in Come Here is as follows:

NOTE Example 1.1: Basic text output
TELL "Hello, world!" NEXT

TELL is the Come Here statement for writing text to the screen.  It takes one or more arguments stating what is to be written.  (Multiple arguments to a statement are always separated by nothing more than a space.  This space isn't even always necessary, but to improve legibility it'll always be put in in this tutorial.)  NEXT is a constant representing a newline character, ensuring that the cursor ends up on the next line after the message has been printed.  The other symbolic constants are QUOTE, representing the double quotation mark character itself, and BLANK, which when used in a TELL statement causes the screen to be cleared.

A number can be used in place of a string.  A number represents the corresponding character in the platform's character set, which will be assumed to be ASCII (or rather, any of its 8-bit supersets) for most of this tutorial.  Hence the above program can also be written:

NOTE Example 1.2: Another way of writing Hello, world
TELL 72 101 108 108 111 44 32 119 111 114 108 100 10

More about the relationship between numbers and strings will be learned in Lesson 5.  Although this example will work by itself, in general there are complications with ending a TELL statement with a number.  Sticking an empty string "" at end the end of the TELL statement will avoid this complication.  You'll find out why in the next lesson.


As you've probably already guessed, the NOTE keyword introduces a comment.  A comment is itself a kind of statement, which always does nothing.  A comment cannot contain any keyword that introduces a statement, as it will be taken as beginning the next statement.  Since Come Here is case sensitive, and all its keywords are in uppercase and will always be at least two characters long, you can avoid this problem simply by not using two or more uppercase letters together anywhere in a comment.