Converts the inputparameters to characters and returns a string expression.
"(q1f1s1f2s2...fnqn)"
NOTE: The quotation marks and parentheses surrounding the format string are required. The quotation marks can be either single or double quotation marks.
x = STRING([65B,66B,67B]) y = STRING([byte('A'), byte('B'), byte('C')]) z = STRING('A' + 'B' + 'C')
x
is a byte vector, and STRING converts it into a string scalar. The first parameter is 65B, which is a notation indicating that the parameter uses a byte data type, but the result is equal to the decimal ASCII code 65.
x = 123.45 result = STRING(x) PRINT, result
123.45
numbers
to a string data type, using an integer format with a maximum field width of 2 characters. In all three cases, the STRING command entered is:
result = STRING(numbers, Format="(I2)")
numbers = [36, 9, 72]
, and result
is computed with the format string shown, the result is:
PRINT, result
36 9 72
numbers = [5, 7, 9, 100]
, and result
is computed with the format string, the result is:
PRINT, result
5 7 9 **
numbers = [6.12, 4.507, 4.339]
, and result
is computed with the format string, the result is:
PRINT, result
6 4 4
For more information on string formats, see Chapter 7, Working with Text, in the PV-WAVE Programmer's Guide.
For more information on format specification codes, see the PV-WAVE Programmer's Guide.