BASIC weirdness
|
I had occasion to want to write out a lot of debugging data. To simplify this I defined a PROCdumprunning(label$,count%). It starts with another PROC reference. Calling this did nothing, even when I put a deliberate mistake in it. *reportdump proc showed PROCdumprunning, immediately followed by ENDPROC. I changed the name of the proc to PROCshowrunningstat(LABEL$,COUNT%) and now the PROC is executed. I didn’t think any lowercase text was reserved. “dump” seems to be an exception. |
|
I do not think dump is reserved in any way, but not at home to check. |
|
There are no reserved words in PROCFNlabels. Please don’t imaginatify explanations for things you don’t understand. That’s how gods happen. |
|
How would we ever find explanations for whatever in the first place? |
|
So some more testing, and I’m even more confused.
Calling it in the main program fails to execute anything. I can confirm this by adding “GARBLE” as the line immediately before LOCAL. No error is reported. Using *reporttrace proc (yes, Martin, I did get that wrong before) shows that the PROC is executed, and immediately followed by ENDPROC. I have set up a test program which just contains the function, and enough code to call it. This works. So the question now is: What in the main program could cause a function to return immediately, until its name is changed, at which point the content of the function is executed? I have tried increasing the memory used (using END= as in all these programs), but that makes no difference. Changing the name back to dumprunning again causes failure. Change it to runningstat and it works. The two names are thew same number of characters. Changing it to disprunning (same initial, same length) and it works. dummrunning works. |
|
More than one definition for |
|
Thank you. And thanks to !Locate, I found the other one, in a different file, but linked. Martin: If you are in the mood for making improvements, it would be nice if reporttrace could report the file (main or library) where the report is coming from. Reportstack would be easier to interpret with this information too, though I suspect in that case it’s impossible. |
|
Science. |
|
How would we ever find explanations for whatever in the first place? Science exists by the grace of imagination. |
|
Do people ‘Dream’ inventions – I wonder. Like being able to Fly. Space flight – Dan Dare etc. [Edit] Watching someone fly by running down a field by the cliffs – with nothing more than looking like a silk sheet and some cord. Whee – could have been done Thousands of years ago. |
|
It seems Pratchett still lives… Would a god of RO be small and not use much power? |
|
Like a Raspberry Pi? |
|
I suspect that has too many followers to be one of the Small Gods |
|
Occam’s Razor > LSD.
Little Devils. |