public class Variable
extends java.lang.Object
http://safsdev.sourceforge.net/sqabasic2000/DDVariableStore.htm
We use references to Variable objects to prevent human error in keying in DDVariable names and references.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_VAR_IDENTIFIER
'^'
|
Constructor and Description |
---|
Variable(java.lang.String varname)
Create a new Variable object with the given varname.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAssignment(java.lang.String expression)
"^varname=expression" -- Returns an assignment version of this variable.
|
java.lang.String |
getName()
"varname" -- Returns the name of this variable with no leading variable identifier('^').
|
java.lang.String |
getReference()
"^varname" -- Returns a dereferencing version of this variable.
|
public static final java.lang.String DEFAULT_VAR_IDENTIFIER
public Variable(java.lang.String varname)
Note: Special characters should NOT be used where they may conflict with the separator used in your table records.
SAFS DDVariable names are NOT case-sensitive, so variables named 'varname' and 'VARNAME' reference the same variable.
varname
- valid DDVariable name (cannot be null or contain whitespace).
The name provided will be trim()'d prior to use.\java.lang.IllegalArgumentException
- if null or zero-length name is specifiedpublic java.lang.String getName()
Some SAFS commands want the names of variables.
Attempting to provide the variable name with the variable identifier prefix
will result in providing the variable's value instead of its name at runtime.
public java.lang.String getReference()
public java.lang.String getAssignment(java.lang.String expression)
Copyright © SAS Institute. All Rights Reserved.