Pre-processor codes provide access to program information about the specific sampling design. These codes are processed before the formatting codes are applied.
Every VSP report preprocessor command has the following format:
{proc}command{/proc}
command is one of the following expressions: |
Which performs the following function: |
if bool_expression is true, processes lines up to else or endif command |
|
else |
if previous bool_expression is false, processes lines up to endif command |
endif |
stops if command processing (if commands can be nested to any level) |
for variable\minvalue\maxvalue |
repeatedly processes lines up to endfor command, stepping integer variable (e.g. j) from int_expression minvalue to int_expression maxvalue. See note 1. |
endfor |
stops for command processing (for commands can be nested to any level) |
formati"formatstring" int_expression |
takes int_expression and formats it for output to the report |
formatd"formatstring"dbl_expression |
takes dbl_expression and formats it for output to the report |
formats"formatstring"{funcs} str_func {/func} |
takes the results of the string function and formats it for output to the report |
setvarb"bvar"\bool_expression |
takes the bool_expression and stores the value in the local variable bvar. See note 1. |
setvard"dvar"\dbl_expression |
takes the dbl_expression and stores the value in the local variable dvar. See note 1. |
setvari"ivar"\int_expression |
takes the int_expression and stores the value in the local variable ivar. See note 1. |
attrib |
places the table of sample attributes into the report |
costs |
places the table of costs into the report |
costswath |
places the table of swath costs into the report |
sens |
places the sensitivity analysis table into the report |
tests |
places the stratified means results table into the report |
context"block _ name" |
delimits sections of a file. This command applies only to special files such as Advisor.rpt or Welcome.rpt and is used in conjunction with the link {k} format code . When a link is selected in the program, the only lines used are those from the context block where the string block _ name exactly matches the string text from the selected link. |
Note 1:
When referring to a local or stepping variable (e.g. j) in a later expression, precede it with a period. (e.g. {vari}.j{/var} ).