SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 2 Vol 1

STRING VARIABLE

Name:
    STRING VARIABLE
Type:
    Let Subcommand
Purpose:
    Create a string variable from a list of strings and save it to the file dpzchf.dat.
Description:
    The Dataplot READ command can optionally read character data. The READ command saves these character variables to the file "dpzchf.dat".

    The STRING VARIABLE command allows you to add character variables to "dpzchf.dat" from a list of scalar strings.

    You can specify whether you want Dataplot to overwrite the current contents of "dpzchf.dat" or append the new variable to the current contents of "dpzchf.dat".

    To have the STRING VARIABLE command overwrite the current contents of "dpzchf.dat", enter

      SET CHARACTER VARIABLE OVERWRITE

    To have the STRING VARIABLE command append the new string variable to the current contents of "dpzchf.dat", enter

      SET CHARACTER VARIABLE APPEND
Syntax:
    LET <sout> = STRING VARIABLE <s1> ... <sk>
    where <sout> is the name of the resulting string variable;
    and <s1> ... <sk> is a list of one or more previously defined strings or literal text strings.

    Literal text strings should be enclosed in quotes. If an argument on the right hand side of the equal sign is not enclosed in quotes, it will be assumed to be a previously defined string. If an argument is not enclosed in quotes and is not the name of a previously defined string, an error message will be returned and <sout> will not be created.

    The TO syntax is supported for the argument list (see the Examples).

Examples:
    LET IX = STRING VARIABLE S1 S2 S3
    LET IX = STRING VARIABLE S1 TO S10
    LET IX = STRING VARIABLE "Group 1" "Group 2" "Group 3"
    LET IX = STRING VARIABLE "Group 1" S2 "Group 3" S4
Default:
    None
Synonyms:
    None
Related Commands: Applications:
    Data Management
Implementation Date:
    2019/10
Program 1:
     
    set string variable overwrite
    let ix = string variable "Group 1" "Group 2"  "Group 3"
    list dpzchf.dat
        
    The following output is generated
     
           1
    IX               3
    Group 1
    Group 2
    Group 3
        
Program 2:
     
    set string variable overwrite
    let string s1 = Group 1
    let string s2 = Group 2
    let string s3 = Group 3
    let ix = string variable s1 s2 s3
    list dpzchf.dat
    pause
        
    The following output is generated
     
           1
    IX               3
    Group 1
    Group 2
    Group 3
        
     
    .
    set string variable append
    let string s4 = Group 4
    let string s5 = Group 5
    let string s6 = Group 6
    let iy = string variable s4 s5 s6
    list dpzchf.dat
        
    The following output is generated
     
           2
    IX               3
    IY               3
    Group 1                  Group 4
    Group 2                  Group 5
    Group 3                  Group 6
        

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 01/28/2020
Last updated: 01/28/2020

Please email comments on this WWW page to alan.heckert@nist.gov.