|
STRING JUSTIFYName:
That is, you specify the desired length of the string. If LEFT justification is requested, trailing spaces will be added to the end of the string so that the string has the desired length. Likewise, if RIGHT justification is requested, leading spaces will be added to the beginning of the string. If CENTER justification is requested, both leading and trailing spaces will be added. If the requested string already has a length greater than the requested length, the output string will be set equal to the input string. By default, the added leading and trailing characters are spaces. You can specify a different character by entering the command
To reset the default of spaces, enter
where <sout> is the name of the resulting string; <sorg> is the name of the original string; and <nlen> is the desired length of the output string. If n1 is the length of the original string and <nlen> is n2, then n2 - n1 spaces will be added to the end of <sorg>. If n1 ≥n2, <sout> will be set equal to <sorg>.
where <sout> is the name of the resulting string; <sorg> is the name of the original string; and <nlen> is the desired length of the output string. If n1 is the length of the original string and <nlen> is n2, then n2 - n1 spaces will be added to the beginning of <sorg>. If n1 >= n2, <sout> will be set equal to <sorg>.
where <sout> is the name of the resulting string; <sorg> is the name of the original string; and <nlen> is the desired length of the output string. If n1 is the length of the original string and <nlen> is n2, then (n2 - n1)/2 spaces will be added to the beginning of <sorg> and (n2 - n1)/2 spaces will be added to the end of <sorg>. If n2 - n1 is odd, the extra space will be added to the beginning of <sorg>. If n1 ≥ n2, <sout> will be set equal to <sorg>.
LET SOUT = STRING RIGHT JUSTIFY S1 20 LET SOUT = STRING CENTER JUSTIFY S1 NLEN
you need to do
LET SOUT = STRING RIGHT JUSTIFY SORG 10 The length parameter can be either a parameter or a numeric value. However, it cannot be a numeric expression. So
LET SOUT = STRING RIGHT JUSTIFY SORG NLEN are both allowed but
is not allowed. You would need to enter this as
LET SOUT = STRING RIGHT JUSTIFY SORG NLEN2
SKIP 25 READ BERGER1.DAT Y X FIT Y X LET CC = CORRELATION Y X . LET STRING S1 = A0: LET STRING S2 = A1: LET STRING S3 = CORR: LET NLEN = 8 LET S1 = STRING LEFT JUSTIFY S1 NLEN LET S2 = STRING LEFT JUSTIFY S2 NLEN LET S3 = STRING LEFT JUSTIFY S3 NLEN LET A0 = ROUND(A0,2) LET A1 = ROUND(A1,2) LET CC = ROUND(CC,2) LEGEND 1 ^S1 ^A0 LEGEND 2 ^S2 ^A1 LEGEND 3 ^S3 ^CC . CHARACTER X BLANK LINE BLANK SOLID . PLOT Y PRED VS X
|
Privacy
Policy/Security Notice
NIST is an agency of the U.S.
Commerce Department.
Date created: 01/31/2019 |