National Instruments 320682C Musical Toy Instrument User Manual


 
Formatting and I/O Library Chapter 2
LabWindows/CVI Standard Libraries 2-38 © National Instruments Corporation
t Truncate. The t floating-point modifier indicates that in floating-point to integer
transformations, the floating-point value is truncated instead of rounded. This is the
default.
r Round. The r floating-point modifier indicates that in floating-point to integer
transformations, the floating-point value is rounded instead of truncated. The default
method is truncation.
Note: The value can be represented in scientific notation even when the e modifier is absent.
This occurs when the absolute value of the argument is greater than 1.0e40 or less
than 1.0e-40, or when the absolute value of the argument is greater than 1.0e20 or less
than 1.0e-4 and neither the p modifier nor the w modifier is present.
Formatting String Modifiers (%s)
in Specify Array Offset. The i string modifier specifies an offset within a string. It
indicates the location within the string where processing is to begin.
n
is the zero-
based index of the first byte to process. Thus, %s[i2] applied to a target string
begins placing data in the third byte of the string.
a Append. When applied to a target format specifier, the a string modifier specifies
that all formatted data be appended to the target string. The data is appended
beginning at the first occurrence of an ASCII NUL in the target string.
wn Specify String Size. When modifying a source format specifier, the w string modifier
specifies the maximum number of bytes to be consumed from the string argument.
You can enter any non-negative value here, the default being zero, which indicates
that the entire string should be consumed.
When modifying a target format specifier, the w string modifier specifies the exact
number of bytes to store in the string, excluding the terminating ASCII NUL. If
n
is
zero or omitted, as many bytes are stored as are called for by the sources. When
n
is
greater than the number of bytes available from the source, the remaining bytes are
filled with ASCII NULs if the q modifier is used, or blanks if the q modifier is not
present.
When the w string modifier is used in conjunction with the a string modifier,
n
indicates the number of bytes to append to the string excluding the terminating ASCII
NUL.
If w
n
modifies a target string and
n
is larger than the number of bytes in the target
argument, the target string is overwritten in compiled C.
q Append NULs. When applied to a target string in conjunction with the w string
modifier, the q string modifier specifies that unfilled bytes at the end of the target
string be set to ASCII NULs instead of blanks.