Print

Print
The **Print** statement causes text to be displayed on the web page. The syntax:

PRINT expr$[;] //- Put expr$ into the display output. An optional semicolon suppresses end of line.//

expr$ can be a string expression, a numeric expression, or a combination of both. To concatenate strings or to separate string output from numeric output, use a semicolon. Examples:

code print "Welcome!" print "Hello, "; print "World!" print "The answer is ";42 print 2007 print 1+2 code

To cause a blank line to be printed, use this syntax:

code print

code Or this:

code print ""

code

Output can be displayed and formatted with the **HTML** statement, which works in a similar way to **Print** but offers many more options. See also: HTML in Run BASIC

Here is a small demo program.

code format="vbnet" Print "Hello, "; Print "World." Print " " Print "Hello, " Print "World." print 2007 print "The answer is ";42 print 1+2 code

The output:

code Hello, World.

Hello, World. 2007 The answer is 42 3 code