Page 106 of 346 Start Back Next End ZBasic System Library 94 ZBasic Microcontrollers Debug.Print Type Special Purpose Invocation Debug.Print stringList Parameter Method Type Description stringList ByVal String One or more strings or values to send out the console port. Discussion Debug.Print 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 (by default, but see Option Console in the ZBasic Language Reference Manual). The arguments provided to the command consist of zero or more strings or values each separated by a semicolon. Unless the list ends with a semicolon, a carriage return/new line will also be output after all of the strings have been output. If a non-string scalar value is supplied, it is output as if it were converted to a string using the CStr() function. If a RAM-resident Byte array name is given, its content is output, byte by byte, up to but not including the first byte having the value zero (i.e it is treated as a null-terminated sequence of characters). When this statement 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. This caveat applies independently to each string in the semicolon-separated list as well as to the end-of-line string, if applicable. The latency-inducing effect described above can be mitigated by preparing a new output queue that is sufficiently large such that there is always enough free space in the queue when this method is invoked. Examples Debug.Print "Hello, world! " This prints the given string followed by a carriage return/new line. Debug.Print "The value is "; val; This prints the string followed immediately by the string equivalent of the value. Note that since the command ends with a semicolon, no carriage return/new line will be generated. Dim ba(1 to 10) as Byte ba(1) = Asc("A") ba(2) = Asc("B") ba(3) = Asc("C") ba(4) = 0 Debug.Print ba This is equivalent to Debug.Print "ABC". Compatibility This function is not available on VM mode devices nor in BasicX compatibility mode. See Also Console.Write, Console.WriteLine