STRING COMBINE
Name:
Type:
Purpose:
Combine strings or create a string from a list of arguments.
Description:
The STRING CONCATENATE command is used to
concatenate strings. The STRING COMBINE command is a variant of
STRING CONCATENATE that varies in the following ways:
- With STRING CONCATENATE, the arguments are previously
defined strings. With STRING COMBINE, Dataplot first
checks to see if the argument is the name of a previously
defined string. If yes, the contents of the string
are added to the contents of the output string (i.e.,
the same as STRING CONCATENATE). However if the argument
is of any type other than string or it is not a previously
defined name, the argument is added to the output string
as literal text.
- The STRING COMBINE inserts a space between the input
strings/arguments. With STRING CONCATENATE, this has
to be done manually (i.e., you need to define a string
that contains a space and use this between the other
arguments).
- The STRING COMBINE command supports the TO syntax. That
is, entering
LET SOUT = STRING COMBINE X1 TO X8
is equivalent to entering
LET SOUT = STRING COMBINE X1 X2 X3 X4 X5 X6 X7 X8
This command has two primary uses:
- As an alternative to STRING CONCATENATE when you want to
automatically include a space between the input strings.
- Most Dataplot analysis and graphics commands now support
the TO syntax. However, there are cases, such as the
LET command, where the TO syntax can be useful. The
STRING COMBINE can be used to easily create a command
string. This is demonstrated in the program example
below.
Syntax:
LET <sout> = STRING COMBINE <s1> ... <sk>
where <sout> is the name of the resulting string;
and <s1> ... <sk> is a list of one or more previously
defined strings.
Examples:
LET STALL = STRING COMBINE X1 X2 X3
LET STALL = STRING COMBINE X1 TO X8
Note:
The name of the output string can be the same as one of the
input strings. For example,
LET STRING S1 = One
LET STRING S2 = Two
LET STRING S3 = Three
LET SOUT = STRING COMBINE S1 S2 S3
Note:
Note:
The total number of characters that DATAPLOT can use for storing
functions and strings is set when DATAPLOT is built. The current
default (11/2008) is 50,000 characters. Previous versions may set
this limit at 1,000 or 10,000 characters. This limit applies to
the combined number of characters for all functions and strings.
Default:
Synonyms:
Related Commands:
Applications:
Implementation Date:
2018/02
2019/12: Added SET STRING COMBINE SEPARATOR
Program 1:
SKIP 25
READ BOXREACT.DAT Y X1 TO X5
LET STALL = STRING COMBINE X1 TO X5
LET CONFTAG1 CONFTAG2 = DEX CONFOUND ^STALL
Privacy
Policy/Security Notice
Disclaimer |
FOIA
NIST is an agency of the U.S.
Commerce Department.
Date created: 04/04/2018
Last updated: 12/30/2019
Please email comments on this WWW page to
[email protected].
|
|