|
STRING SPACEName:
will create a string S with a single space character. However, if you do something like
LET STRING T = ^S you will get an error message and the string T will not be created. This is due to the fact that the substitution (i.e., the "^") is performed before the command is interpreted. That is, the command that Dataplot tries to interpret is
However, if you enter the commands
LET STRING S = SP() SET STRING SPACE EXPAND LET STRING T = ^S then Dataplot sees the command
and it creates the string T with a single space character. Since in most cases you want the SP() to be converted to a single space, EXPAND is the default.
Specifying EXPAND means that if SP() is encountered in a LET STRING command, it will be converted to a single space. Specifying IGNORE means that if SP() is encountered in a LET STRING command, it will left as SP(). Any argument other than PROMPT or TERMINATE will be treated as equivalent to IGNORE (for example, SET FATAL ERROR DEFAULT).
SET STRING SPACE EXPAND
. The following sequence of commands results in an error . for the string st2. . let string st1 = sp() let string st2 = ^st1 . . The following successfully creates st2 as a string with . single blank character. . set string space ignore let string st1 = sp() set string space expand let string st2 = ^st1The following output is generated **************************************************************** ** . The following sequence of commands results in an error ** **************************************************************** ***************************** ** . for the string st2. ** ***************************** ********* ** . ** ********* ***************************** ** let string st1 = sp() ** ***************************** INPUT FUNCTION = sp() OUTPUT FUNCTION = THE NAME ST1 HAS JUST BEEN EQUIVALENCED TO THE FUNCTION -- ************************ ** let string st2 = ** ************************ ***** ERROR IN DPLETF-- IMPROPER FORM FOR THE LET FUNCTION COMMAND. NOTHING FOUND TO THE RIGHT OF THE EQUAL SIGN THE ENTERED COMMAND LINE IS AS FOLLOWS-- LET STRING ST2 = ***** ERROR CONDITION ENCOUNTERED AT MAIN 8112. THE FIRST 8 CHARACTERS OF THE FIRST WORD OF THE COMMAND ARE LET PLEASE REENTER COMMAND LINE. ********* ** . ** ********* ***************************************************************** ** . The following successfully creates st2 as a string with ** ***************************************************************** ********************************* ** . single blank character. ** ********************************* ********* ** . ** ********* ******************************* ** set string space ignore ** ******************************* THE FORTRAN COMMON CHARACTER VARIABLE STRISPAC HAS JUST BEEN SET TO IGNO ***************************** ** let string st1 = sp() ** ***************************** INPUT FUNCTION = sp() OUTPUT FUNCTION = sp() THE NAME ST1 HAS JUST BEEN EQUIVALENCED TO THE FUNCTION -- sp() ******************************* ** set string space expand ** ******************************* THE FORTRAN COMMON CHARACTER VARIABLE STRISPAC HAS JUST BEEN SET TO EXPA ***************************** ** let string st2 = sp() ** ***************************** INPUT FUNCTION = sp() OUTPUT FUNCTION = THE NAME ST2 HAS JUST BEEN EQUIVALENCED TO THE FUNCTION --
|
Privacy
Policy/Security Notice
NIST is an agency of the U.S.
Commerce Department.
Date created: 02/10/2015 |