News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Declaring a variable inside code

Started by trastikata, Oct 16, 2022, 08:48 AM

Previous topic - Next topic

top204

#20
QuoteSometimes you have to <break the rules> to get a job done. A good engineer is pragmatic

Very, very true John.

I had to tear up all the rules in order to add a procedure mechanism and local variables to an, already written, "flat language", but still have it operating as a flat language if required to do so, and not just a strictly procedural language. :-)

So, please remember users, that the Positron language is not a dedicated procedural language, and if all of those extra mechanisms are required that make code more bloated and complex to operate, and often slower to operate are required, there is always C or C++ (Yuck!!!!) :-) Or if "real" bloat and slowness and truly silly complexity for the sake of complexity is required, take a look at python or micropython (double Yuck!!). LOL. But when using C++ for a "real" program on 8-bit devices, and not just well chosen demos, take a look under the hood and see the extras and the mess that will occur in some areas of the assembler code, especially with pointers. :-)


John Drew

@JohnB,
Good point re aliasing but still necessary to ensure assignment before use.
My save space tactic is, for me, a last resort as I prefer using the local variables as per Les's intent.
John D