|
VariablesMore advanced ploticus scripts can set and reference variables. Variable names must begin with a letter and may contain letters, digits, underscore (_) and period (.). Names are case-sensitive. Maximum length of a variable name is 38 characters. Variables may hold numbers, alphanumerics, or lists, but are always internally stored in alphanumeric form, with a maximum content length is 250 characters. All variables are global in scope.Variables may be assigned using the #set directive, like this: #set ymax = 200 Variables may be referenced (used) anywhere in a script. An at-sign (@) is used at the beginning of a variable name when its contents are to be displayed or referenced, for example: yrange: 0 @ymax In some situations (select statements and getdata filters) you may need to use two at-signs (@@), so that one at-sign survives the script evaluation (if that's what you want).
An attempt to evaluate a variable that has never been assigned a value
will result in cancellation of the evaluation (the variable name will be
passed through transparently) and no error condition will be raised.
Several
reserved variables
exist.
System VariablesPloticus sets certain variables, described below. These variables may be accessed by user scripts as needed.In order to reference a variable immediately after the proc that set the variable, #endproc must be used to mark the end of the proc that set the variable.
Nothing bad will happen if you happen to assign a value to one of these
variables, other than the chance that ploticus will update the variable's value
when you're not expecting it.
PLVERSION
AREALEFT AREARIGHT AREABOTTOM AREATOP
XMIN XMAX YMIN YMAX
XINC YINC
DATAXMIN, DATAXMAX
DATAYMIN, DATAYMAX
CM_UNITS
DEVICE
NFIELDS
NRECORDS
NVALUES
RANGEBARMEDIAN RANGEBARMIN RANGEBARMAX
TOTALS
BREAKFIELD1 ..
XSTART, YSTART
XFINAL, YFINAL
|
![]() data display engine Copyright Steve Grubb ![]() |