First Steps

Hello World

Most tutorials start off with getting you to display “Hello World”, so why should this be any different?

Type in:

put "Hello World"

Now save and run it. To run it, just press F11. If you have not already saved it, you will br prompted to do so now.

That was easy and we have got that one out of the way, but let us try something different.

Change your code to:

put 'Hello World'

and save and run it. You will see no difference in the output. Both single and double quote characters may be used to enclose strings.

You may also include the other quote character as part of your text without any problem.

Let us now get a little more complicated. Suppose that you wanted to display:

John's computer isn't showing "Hello World".

Enter and run:

put 'John''s computer isn''t showing "Hello World".'
put "John's computer isn't showing ""Hello World""."

As you can see both lines give the same result. Where the enclosing quote character is doubled it does not end the string but instead acts as an escape character for itself.

Finally try this:

put hello world

Just remember this for now. It will be explained later.

Of course, if you were brought up in the world of escape characters and long for them, you can have them, but more of that later.


programmers_guide/hello.txt · Last modified: 2015/01/06 09:00 by don