CoCo Editor

Edit and List

I’ve been using to instead of go to trap runtime errors so I can use labels instead of line numbers. And then I remembered ‘for variable=expr to expr.’ I’ve decided to make a severe change. No one is going to use edit or list in a program, so I can use go edit for go to and go list for go sub. The runtime system checks after a go to see if it is a to or a sub. edit and list are neither so it will throw a syntax error. All I need to do is check if the run pointer is pointing at an edit or a list. If edit or list show up anywhere else the runtime system will throw a direct statement in program error. If the pointer is pointing at edit I know I have a go to. If it is pointing at list I know I have a go sub. Because it was a syntax error. Of course if I want to be sure I can check the token before the list or edit. If it is a go I can be positive. I felt a little bad about spending so much time figuring out the stack pointer. It needed doing. It was meant to be.

By earlcasper

Retired US Postal Clerk. BS at University of Washington. Studied computers at Arizona State University. Lives in Kansas City KS.

Leave a Reply

Your email address will not be published. Required fields are marked *