• <Helps for 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
      • Language Elements
        • Delimiters
        • Comments
        • Logic Preprocessor
        • Variables and Constants
        • Expressions
          • Expressions
          • Substring Expressions
          • Boolean Values
          • Special Values
          • Refused Value
        • Operators
        • Files
        • Miscellaneous
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • CSPro Statements and Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Appendix
  • <Helps for CSEntry>
  • <Helps for CSBatch>
  • <Helps for CSTab>
  • <Helps for DataViewer>
  • <Helps for TextView>
  • <Helps for TblView>
  • <Helps for TRSWin>
  • <Helps for CSDeploy>
  • <Helps for CSPack>
  • <Helps for CSFreq>
  • <Helps for CSSort>
  • <Helps for CSExport>
  • <Helps for CSReFmt>
  • <Helps for CSDiff>
  • <Helps for CSConcat>
  • <Helps for TRSSetup>
  • <Helps for ParadataViewer>
  • <Helps for ParadataConcat>
  • <Helps for CSIndex>
  • <Helps for Excel2CSPro>
  • <Helps for CSWeb>

Boolean Values

There are two numeric values in the CSPro language that translate to boolean values as used in other programming languages. The value true is equivalent to 1 and the value false is equivalent to 0. Note that you need to be cautious when using true in conditional expressions, as a conditional expression is true if it is neither zero nor special, but comparing something with true is true only if the compared value is 1. That is:
numeric value = 2;

if value then
   
errmsg("This will be displayed");
endif;

if value = true then
   
errmsg("This will not be displayed");
endif;
See also: Special Values