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 1 Vol 2

SUBSTITUTE CHARACTER

Name:
    SUBSTITUTE CHARACTER
Type:
    Support Command
Purpose:
    Specify the character to use as the substitution character.
Description:
    The substitute character signifies that the parameter following it should be replaced with the value of that parameter.
Syntax:
    SUBSTITUTE CHARACTER <char>
    where <char> is the character to use as the substitute character.
Examples:
    SUBSTITUTE CHARACTER @
    SUBSTITUTE CHARACTER ^
Note:
    Generally it is not necessary to change the substitute character. The one exception is if you want to define strings that contain the default substitute character.
Note:
    The substitute character can be used effectively with the LOOP command. For example, assume that variables Y1 thru YN and strings S1 and SN have been previously defined:

       
      LOOP FOR K = 1 1 N
          TITLE Y^K VS X
          LEGEND 1 ^S^K
          PLOT Y^K VS X
      END OF LOOP
          

    Note the distinction between Y^K in the PLOT command and ^S^K in the LEGEND command. For the plot command, we want PLOT Y1 VS X while for the LEGEND command we want to insert the value of the string S1. This is the reason that the Y^K has no preceding ^ while the ^S^K does.

Note:
    The following characters are used to determine the end of the parameter name:

        - a space
      ( - a left parenthesis
      ) - a right parenthesis
      " - a quote character
      & - an ampersand character
      . - a period
      ^ - another substitute character
      , - a comma
      : - a colon
      ; - a semi-colon
      ] - a right bracket
      + - a plus
      - - a minus
      * - an asterisk
      / - a forward slash
Note:
    The substitution is performed before the command is interpreted.
Note:
    If the parameter is undefined, it is replaced with a space character in the command line.
Note:
    The VALU() command also performs parameter substitution. However, it only works for a few commands (specifically LEGEND, TITLE, LABEL, and TEXT) while the substitute character works on any command.
Note:
    The substitute character can also be changed with the command

      SET REPLACE <char>
Default:
    The default substitute character is ^ .
Synonyms:
    REPLACEMENT CHARACTER
Related Commands:
    LOOP = Perform a loop.
    VALU() = Perform parameter substitution within certain commands.
    TERMINATOR CHARACTER = Define the character that terminates a command.
    CONTINUE CHARACTER = Define the character that specifies that a command is continued onto the next line.
Applications:
    XX
Implementation Date:
    Pre-1987
Program:
     
    . Step 1:   Read the data
    .
    skip 25
    read weibbury.dat y
    skip 0
    .
    . Step 2:   Maximum likelihood estimates
    .
    set write decimals 5
    weibull mle y
    let gamma = gammaml
    let pploc   = 0
    let ppscale = alphaml
    .
    title case asis
    label case asis
    title Weibull Probability Plot
    y1label Sorted Data
    x1label Percentiles for Fitted Weibull Distribution
    character circle
    character hw 1 0.75
    character fill on
    line blank
    .
    . Step 3:   Generate probability plot
    .
    weibull probability plot y
    .
    let gamma = round(gamma,2)
    move 20 85
    text Gamma = ^gamma
    let ppscale = round(ppscale,2)
    move 20 82
    text Scale = ^ppscale
    let ppcc = round(ppcc,3)
    move 20 79
    text PPCC = ^ppcc
        
    plot generated by sample program

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 06/10/2016
Last updated: 06/10/2016

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