Clearly I have erred, first in drawing assumptions and, second by posting untested code based on those assumptions. I dislike being wrong, but I dislike being ignorant even more. Ha! Is this not true for others as well?
So perhaps, it is germane to the discussion, will someone help me to understand my error? In the PBP manual, the statement SYMBOL is used to assign a second name to an existing variable - the process is described as aliasing; I presumed this meant then that both variable names would create pointers to the same RAM address - and be resolved during the assembly process. This misunderstanding was reinforced in the book PIC Basic Projects: 30 Projects Using PicBasic and PicBasic Pro by Dogan Ibrahim where he asserts on page 84:
"In order to make programs more readable, we can assign meaningful names to variables..." He uses the example: SYMBOL Count = B0. The author goes on to note: "This statement does not occupy any location in microcontroller RAM memory".
I accept Henrik's explanation; yet, I struggle to understand the purpose of SYMBOL and how it is used if not in this way.
As an aside, I also note that Curiousone did not make the SYMBOL assignments I suggested in the code he posted.




Bookmarks