Diagnostic method that writes a numeric or string value to the GPL console with no line terminator.
Console.Write (number)
-or-
Console.Write (string)
Prerequisites
None
Parameters
number
A required numeric expression whose value is displayed.
string
A required string expression whose value is displayed.
Remarks
This method writes a single numeric or string value to the GPL console with no line terminator. Subsequent output continues on the same line. For output that combines both string and numeric values, use the CStr function.
The actual destination for console output depends on how the currently executing thread was started and whether or not the -event switch is present in the Start console command. If a thread is started by another thread, the destination depends on how the original thread was started.
| Thread Start Source | -event Specified | Console Output Destination |
|---|---|---|
|
Serial console on /dev/com1 |
No |
/dev/com1 serial port |
|
Serial console on /dev/com1 |
Yes |
GDE GPL Output window |
|
GDE |
N/A |
GDE GPL Output window |
|
Operator Control Panel |
N/A |
/dev/com1 serial port |
|
TELNET |
Yes |
GDE GPL Output window |
|
TELNET (DataID 411=1) |
No |
/dev/com1 serial port |
|
TELNET (DataID 411=2) |
No |
TELNET connection |
Because the console output destination may vary, it is best to only use this method for debugging. To always do output to the /dev/com1 serial port, use the StreamWriterClass methods specifying device /dev/com1. To send messages to the system operator, use the Controller.SystemMessage method.
Examples
Console.Write("Test ") ' Produces the output: "Test 1"
Console.Write(1)
See Also
Console Class | Console.WriteLine | Controller.SystemMessage | CStr Function | StreamWriter Class