Difference between revisions of "MC-Basic:PRINT"

From SoftMC-Wiki
Jump to: navigation, search
m (Miborich moved page Axystems:MC-Basic:PRINT to MC-Basic:PRINT: Global renaming of Axystems: namespace into (Main):)
(added link to MC-Basic:PrintPoint)
 
(3 intermediate revisions by 2 users not shown)
Line 4: Line 4:
  
 
|SYNTAX=
 
|SYNTAX=
PRINT “''<String>” <nowiki>|</nowiki> [Expression] {, <nowiki>|</nowiki> ; “<String>”  <nowiki>|</nowiki> [Expression]'' }* {DetectOverflow = <'' Expression'' >}
+
PRINT “''<String>” ?'"`UNIQ--nowiki-00000001-QINU`"'? [Expression] {, ?'"`UNIQ--nowiki-00000002-QINU`"'? ; “<String>”  ?'"`UNIQ--nowiki-00000003-QINU`"'? [Expression]'' }* {DetectOverflow = <'' Expression'' >}
  
 
|AVAILABILITY=
 
|AVAILABILITY=
Line 54: Line 54:
  
 
|SEE ALSO=
 
|SEE ALSO=
* [[Axystems:MC-Basic:PRINTUSING|PRINTUSING]]
+
* [[MC-Basic:PRINTUSING|PRINTUSING]]
* [[Axystems:MC-Basic:SYSTEM.PRINTMODE|SYSTEM.PRINTMODE]]
+
* [[MC-Basic:SYSTEM.PRINTMODE|SYSTEM.PRINTMODE]]
 +
* [[MC-Basic:PRINTTOBUFF|PRINTTOBUFF]]
 +
* [[MC-Basic:PRINTUSINGTOBUFF|PRINTUSINGTOBUFF]]
 +
* [[MC-Basic:PrintPoint|PrintPoint]]
  
  
 
}}
 
}}

Latest revision as of 15:11, 10 November 2020

Multiple strings and expressions are printed, separated by either a comma or a semicolon. The semicolon puts the two expressions next to each other while the comma puts a tab between them. The semicolon at the end of the expression suppresses CR-LF, allowing several print statements to be concatenated. The message is printed to the output window of ControlStudio with the last print statement printed without a semicolon at the end. Variables are “watched” by simply querying them. The ControlStudio Watch window manages queries to the specified variables. Use Print “” to print an empty line. You can supress the carriage return at the end of a line by terminating PRINT with a semicolon.

The DetectOverflow parameter handles printouts that do not fit into the internal message queue (64 messages). When value is zero, these printouts are silently dropped and task is not delayed. However, if DetectOverflow is “1” and there is no free space in the print queue, task is stopped with run-time error. This optional flag defaults to Zero when not used.

Short form

?

Syntax

PRINT “<String>” ?'"`UNIQ--nowiki-00000001-QINU`"'? [Expression] {, ?'"`UNIQ--nowiki-00000002-QINU`"'? ; “<String>”  ?'"`UNIQ--nowiki-00000003-QINU`"'? [Expression] }* {DetectOverflow = < Expression >}

Availability

All versions

DetectOverflow parameter: Version 4.0.5 and higher

Type

< (DetectOverflow)Expression>: Long

Range

< (DetectOverflow)Expression>: 0 or 1

Scope

Configuration, Task or Terminal

Limitations

Variables defined within a task may be queried from outside the task (for example, from the terminal) only when the task is idle. Within a task, local variables are only available if the task is idled in a section of code wherein the local variable was declared.

Examples

Print "Hello,";

Print "world."
Prints the following:
Hello, world.


Common shared Message as string

Try

Print Message

Catch 8036      ‘ Entry Station output buffer overflow.

End Try

See Also