• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
      • Introduction to CSPro Language
      • Data Requirements
      • CSPro Program Structure
      • Programming Standards
      • Code Folding
      • Debugging CSPro Applications
      • Declaration Section
      • Procedural Sections
        • Statements
        • Proc Statement
        • PreProc Statement
        • OnFocus Statement
        • OnOccChange Statement
        • KillFocus Statement
        • PostProc Statement
      • Logic
      • Language Elements
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Statements

A procedure contains a series of statements. Each statement is a complete instruction to the computer.
Executable Statements
Executable statements begin with a command and end with a semicolon (;). They are made up of a combination of commands, keywords, expressions, and functions. For example:
skip to Q103;
skip is a command, to is a keyword, and Q103 is the name of a data entry field.
Assignment Statements
Assignment statements set a variable equal to the value of an expression and do not contain commands. If the expression is a string expression, then the variable must be alphanumeric. If the expression is numeric or conditional, then the variable must be numeric. For example:
AGE = 10;
Q102 = previousAge;
Y = 
sqrt(X);
NAME = 
"John Doe";
SEX_RATIO = MALES / FEMALES;