50
Console.WriteLine
Type
Special Purpose
Invocation
Console.WriteLine(arg)
Parameter
Method
Type
Description
arg
ByVal
String
A string to send to Com1.
Discussion
Console.WriteLine is neither a subroutine nor a function. It has more in common with ZBasic statements
but it described here for ease of reference. This special purpose method is useful for outputting
debugging information and other data to Com1. Note that a carriage return/new line is always output
following the string.
When this method is invoked, execution of the current task will not continue and no other task will be
allowed to run until the strings characters have been transferred to the system output queue. This caveat
applies separately to the string specified by the parameter and to the end-of-line sequence that is also
output. The Debug.Print page contains some example code that illustrates a way to mitigate the latency
that results from this implementation detail.
In contrast to other System Library routines that copy data to a queue, the string length is not limited to
the system output queue length.
Examples
Console.WriteLine("Hello, world! ")
Console.WriteLine("The value is " & CStr(val))
The second example uses the concatenation operator to produce a single string that is passed to the
method.
See Also