Feature Upgrade: Since CSPro 6.0, you can now use variable-length strings. You are encouraged to use the string declaration instead of fixed-width alpha variables whenever possible.
alpha ʃ(length)ʅ var1ʃ, var2, ..., varNʅ;
The
alpha statement is used to define alphanumeric variables within an application. The
length is the number of characters in the variable. The length applies to all variables declared in the same alpha statement. If no length is given, 16 is assigned. The maximum string length that can be declared is 8,192.
If you attempt to assign a string that is longer than the variable's size, the string will be truncated from the right. Conversely, it you assign a string that is shorter than the variable's size, the trailing character positions will be blank-filled.
The following variable modifiers apply to alphanumeric variables:
- persistent: to persist the variable's value from one run of an application to another.
alpha(10) x, y;
x = "hi mom"; // x will equal "hi mom "
// 1234567890
x = "good night, mom"; // x will equal "good night"
// 1234567890