Shop OBEX P1 Docs P2 Docs Learn Events
How many CONs — Parallax Forums

How many CONs

NewzedNewzed Posts: 2,503
edited 2006-01-10 19:26 in BASIC Stamp
How many CONs can a program have - 255?

Sid

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-01-10 17:53
    Sid -

    I've never seen a stated limit in any of the documentation. The actual limit would be determined by the maximum size of the symbol table that the Stamp Editor/Compiler uses. That table would include all CON and VAR statements, and probably all of the statement labels (targets of GOTO's and GOSUB's, etc), although the latter may be in a separate table.

    Regards,

    Bruce Bates
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-10 18:38
    I don't believe there is an imposed limit, but one has to wonder what kind of [noparse][[/noparse]embedded] program requires that many constants. If you're not actually using all of them in any given iteration of a program, you might consider doing something with a conditional switch.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Tom WalkerTom Walker Posts: 509
    edited 2006-01-10 18:41
    I would think that CON's are resolved at compile time. This would imply that any limit would be due to limits on the compiling machine...i.e. none within reason.

    Is this thinking correct?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-10 19:26
    Yes, CONs are resolved at compile time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.