Difference between revisions of "Print"
Jump to navigation
Jump to search
(Created page with "<c>print</c> is an intrinsic function that displays a string to the user. It is a standard intrinsic, though there may be some implement...") |
m |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<c>print</c> is an [[:Category:Intrinsic Functions|intrinsic function]] that displays a [[string]] to the user. It is a standard intrinsic, though there may be some implementations where this output is not actually visible. In implementations that have something like a standard output stream, <c>print</c> adds the given string to that stream, typically followed by the standard line delimiter. | <c>print</c> is an [[:Category:Intrinsic Functions|intrinsic function]] that displays a [[string]] to the user. It is a standard intrinsic, though there may be some implementations where this output is not actually visible. In implementations that have something like a standard output stream, <c>print</c> adds the given string to that stream, typically followed by the standard line delimiter. | ||
+ | |||
+ | See also: [[PixelDisplay.print]] | ||
=== Arguments === | === Arguments === | ||
Line 8: | Line 10: | ||
|- | |- | ||
| s || "" || string to display to the user | | s || "" || string to display to the user | ||
+ | |- | ||
+ | | delimiter || <platform's new line> || string to follow '''s''' instead of standard delimiter | ||
|} | |} | ||
Line 17: | Line 21: | ||
== Example == | == Example == | ||
− | < | + | <ms>print "Hello, world!"</ms> |
[[Category:Intrinsic Functions]] | [[Category:Intrinsic Functions]] |
Latest revision as of 19:44, 30 September 2023
print
is an intrinsic function that displays a string to the user. It is a standard intrinsic, though there may be some implementations where this output is not actually visible. In implementations that have something like a standard output stream, print
adds the given string to that stream, typically followed by the standard line delimiter.
See also: PixelDisplay.print
Arguments
Parameter Name | Default Value | Meaning |
---|---|---|
s | "" | string to display to the user |
delimiter | <platform's new line> | string to follow s instead of standard delimiter |
Usage Notes
print
returns null, and so it is usually used as a statement. As such, it does not require parentheses around its argument.
The argument defaults to an empty string, so print
by itself may be used to print a blank line.
Example
print "Hello, world!"