As a convenience during program development and testing, serial output may be performed to the GPL console. The actual destination of console output depends on the presence of the -event switch on the Start console command. If -event is not present, console output is sent to the first serial port named "/dev/com1". If -event is present, console output is sent to GDE where it is displayed in the GPL Output window.
For more information on how to use and configure the serial ports, see the previous Serial I/O section.
The console output methods are overloaded and allow either a numeric value or string to be output. For output that combines both string and numeric values, use the CStr function.
Public Sub Main
Dim ii As Integer
For ii = 1 To 10
Console.WriteLine("The square of " & CStr(ii) _
& " is " & CStr(ii*ii))
Next ii
End Sub