|
This sounds great.
As to nesting if-elseif-else structures, please try to make this work. There are many situations where this is needed and it would be a bother to be able to us the new structures in one place but not in another. Isn't this a sort of natural recursion application?
To me, one of the biggest issues is generating goto labels that are easy enough to follow that folks that edit the resulting code directly see something that is editible.
How about this format $IF $IFLABEL (optional) $ELSEIF $ELSE $ENDIF
My thoughts would be that if you provided a label, then the label would be used as a basename for the various goto labels in Pbasic, if not, you get what you get.
As to what I mean by a common subroutine, I don't mean jumping to a new program slot and jumping back -- the way Pbasic handles jumps would add a lot of bother and overhead to any such systems. What I do mean is something like the header file, where I could define a subroutine one time and the pre-processor would add the code to the appropriate files for the approriate programming slots.
An input subroutine is a good example. I often end up calling the input subroutine from at least 2 programming slots and sometimes from 3. If I change the variables that the master CPU sends me (perhaps I want delta_t rather that packet_num), I need to change the subrountine in all 3 places or else I get the dreaded "PBasic Error LED of Death" to light up on the Operator Interface and I am dead in the water.
Finally, what about text editing? How do you make your master file that the pre-processor processes? Has anybody made the leap to CodeWright? It is a very good program for C coding and other serious coding projects. One nice thing about CodeWrightt is that it knows the various keywords of the language you are using. It can be set up to show Constants in one color, variables in another, keywords in yet anther, etc. Has anybody taught CodeWright the Pbasic language? Do tell.
Joe J.
|