ViviFire Version of Hello World

Listing 1
' A "Hello, world!" program
Program Hello
Require IO #io
#io.PrintLine("Hello, world!") ' Display message
End

The important parts of this program are the following:

Comments

The first line of the example contains a comment:

' A "Hello, world!" program

The apostrophe (or single quotation mark) begins a comment that continues until the end of the line, and is ignored by the compiler. You can make an entire line a comment, as above, or you can place it after a statement, on the same line, like the following:

#io.PrintLine("Hello, world!") ' Display message

ViviFire also supports two other forms of commenting that can span multiple lines or can be placed in the middle of a statement. The first begins with "/*" and ends with "*/".

/* A "Hello, world!" program.
This program displays the string "Hello, world!" on the screen. */

The second form begins with "/'" and end with "'/".

/' A "Hello, world!" program. '/
/' This program displays the string "Hello, world!" on the screen. '/

Program name

Program Hello

Require statement

Require IO #io

Output

#io.PrintLine("Hello, world!") ' Display message

Compilation and execution