• <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
      • Logic
        • View Logic
        • Create and Edit Logic
        • Find and Replace Logic
        • Compile Logic / An Application
        • OnKey Character Map
        • OnViewQuestionnaire Global Function
        • User and Configuration Settings
        • String Encoder Dialog
        • Path Adjuster Dialog
        • Symbol Analysis
      • 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>

Compile Logic / An Application

Before CSPro can execute your program, it needs to check for errors in the logic. Errors include such problems as misspelling a command, not using proper command syntax, and putting logic in the wrong place. Warnings can also appear during compilation, and often occur from the use of deprecated features.
Compile Scope
You can choose to compile logic for a specific entity (such as a field, roster, or form) or for the entire application. To compile code for a specific entity, simply select that element from the form or batch edit tree. The associated logic for that item will be displayed in the logic view. If you are ready to compile the entire application, select the root node (the topmost entry of the data entry or batch edit tree) and compile.
How to Compile
Press on the toolbar; or from the File menu, select Compile; or press Ctrl+K.
Compiler Results
Error and warning messages will appear within the Compiler Output tab of the message view at the bottom of the workspace. A dot will appear to the left of the line of code containing the problem—red dots indicate an error, yellow dots indicate a warning. Double-clicking the error or warning message will move your cursor to the offending line within the logic view.
To facilitate code development, you should compile your logic on a regular basis to ensure not too many errors are introduced. Depending on the number and type of errors, it can cause CSPro to have difficulty determining the source of the error (for example, missing "end" or "endif" statements can cause a lot of problems). If there are unfinished code blocks that won't compile, they should be commented out until ready to complete.
Is My Program Ready to Run?
  • If there are no errors or warnings, the system will display "Compile Successful" within the Compiler Output tab. You are ready to run your application.
  • If there are no errors but some warnings, the system will present a message for each problem found within the Compiler Output tab. You can run your application, but should make note of the problems found and attempt to resolve them.
  • If one or more errors are found, you will not be able to run your program until they are resolved.