PDA

View Full Version : How many CONs



Newzed
01-11-2006, 12:35 AM
How many CONs can a program have - 255?

Sid

Bruce Bates
01-11-2006, 12:53 AM
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 Williams
01-11-2006, 01:38 AM
I don't believe there is an imposed limit, but one has to wonder what kind of [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 Walker
01-11-2006, 01:41 AM
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 Williams
01-11-2006, 02:26 AM
Yes, CONs are resolved at compile time.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax