Crestron simpl plus language ref 사용자 설명서
Software Crestron
SIMPL+
®
216
z SIMPL+
®
Language Reference Guide - DOC. 5797G
Print
Name:
Print
Syntax:
PRINT(<Static Specification String> [, <arg1> ...]);
Description:
The output of PRINT goes to the CONSOLE port of the control system and can be
monitored in the Crestron Viewport. It can print simple text strings or complex
formatted strings.
monitored in the Crestron Viewport. It can print simple text strings or complex
formatted strings.
Parameters:
<Static Specification String> is a quoted string that contains text and formatting
information. Format specifiers are of the form:
information. Format specifiers are of the form:
%[[Pad]Width]specifier
Valid Format Specifiers
The optional Width specifier is a number that states the width of the field as
characters. If the value to be printed is less than the Width, it is padded on the left
with spaces. Width can be two digits.
characters. If the value to be printed is less than the Width, it is padded on the left
with spaces. Width can be two digits.
The optional Pad specifier works with the Width specifier. If the result of the Width
operation results in the need to add spaces, the Pad specifier can be used to pad with
different values rather than a space. '0' is the only valid pad value, i.e. %03d pads with
leading zeros so 1Z would be printed as 012.
operation results in the need to add spaces, the Pad specifier can be used to pad with
different values rather than a space. '0' is the only valid pad value, i.e. %03d pads with
leading zeros so 1Z would be printed as 012.
As each % value is found, it pulls the matching <arg> off the list. The first % uses
<arg1>, the second % uses <arg2>, etc. If the number of % specifiers does not match
the number of arguments, the program will generate a compile error, the compiler
<arg1>, the second % uses <arg2>, etc. If the number of % specifiers does not match
the number of arguments, the program will generate a compile error, the compiler
s
Specifies a BUFFER_INPUT, STRING, or STRING_INPUT variable.
(unprintable characters are printed in the format that Viewport uses)
(unprintable characters are printed in the format that Viewport uses)
d
Specifies an ANALOG_INPUT, ANALOG_OUTPUT, or INTEGER to be
printed as a signed decimal value.
printed as a signed decimal value.
u
Specifies an ANALOG_INPUT, ANALOG_OUTPUT, or INTEGER to be
printed as an unsigned decimal value.
printed as an unsigned decimal value.
x
Specifies an ANALOG_INPUT, ANALOG_OUTPUT, or INTEGER to be
printed as a lowercase hexadecimal number.
printed as a lowercase hexadecimal number.
X
Specifies an ANALOG_INPUT, ANALOG_OUTPUT, or INTEGER to be
printed as an uppercase hexadecimal number.
printed as an uppercase hexadecimal number.
l
Specifies a long_integer or unsigned_long_integer will follow
%
Prints a % sign (i.e. use %% to print a % sign).
%lD
Specifies a LONG_INTEGER to be printed as a signed decimal value.
%c
Specifies a printable ASCII character to be printed.