65 of 323
ZBasic System Library 55 ZX Microcontroller Family Console.Write Type Special Purpose Invocation Console.Write(arg) Parameter Method Type Description arg ByVal String A string to send to Com1. Discussion Console.Write is neither a subroutine nor a function. It has more in common with ZBasic statements but it is described here for ease of reference. This special purpose method is useful for outputting debugging information and other data to Com1 (by default, but see Option Console in the ZBasic Language Reference Manual). Note that no carriage return/new line is output after 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 string’s characters have been transferred to the system output queue. 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. Example Console.Write("Hello, world! ") Console.Write("The value is " & CStr(val)) This example uses the concatenation operator to produce a single string that is passed to the method. See Also Debug.Print, Console.Read, Console.ReadLine, Console.WriteLine