Announcement

Collapse
No announcement yet.

CONST

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CONST

    Is the only way to define a constant by using the variable name and then the "short cut" character?


    Code:
    e.g. A$ = "Apple", for a constant string
         X% = 1, for a constant integer
    If so.. I would like to recommend the use of the CONST keyword in future version of the PB syntax.

    Code:
    e.g. CONST A as String = "Apple", for a constant string
         CONST X as Integer = 1, for a constant integer

  • #2
    Use string equates and numeric equates. Numeric equates are limited to integer classes only, such as integer, long, quad, unsigned, etc.

    ie,

    $CONSTANTSTRING1 = "HELLO"
    $CONSTANTSTRING2 = "WORLD"
    %CONSTLONG = 12345&
    %CONSTINT = 32767%
    %CONSTDWORD = &H0FFFFFFFF???


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment

    Working...
    X