Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2170
Posted: 04:06am 06 Jul 2017
Copy link to clipboard
Print this post
Hello all.
MMBasic 5.04.04 MM '170 28 pin
getting odd behaviour from ON ERROR SKIP ...
On error skip 1 ' test 1 Print "1 worked"
On error skip: ' test 2 Print "2 worked"
On error skip ' test 3 Print "3 worked"
I usually test stuff like this on more than one platform before squeaking but I only have one on at the moment and working remotely
Edited by CaptainBoing 2017-07-07
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2428
Posted: 04:44am 06 Jul 2017
Copy link to clipboard
Print this post
is the same in 5.04.05. the problem seems to be that ON ERROR SKIP is interpreting the comment as part of the command.
On ERROR SKIP ' this is a comment Print "worked" > > run [1] On ERROR SKIP ' this is a comment Error: Syntax >
cheers, rob :-)
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2170
Posted: 04:49am 06 Jul 2017
Copy link to clipboard
Print this post
Cheers Robert - it's an easy avoid, just wanted the headsup
It doesn't always seem to happen though - I have tried to pin it down a bit. I even tweaked a bit of 5.2 code to have a skip of 1 because it was failing - I put it down to no default anymore but there does seem to be a wrinkle.
moving the comment to the next line it all works ok and if you enter the line in direct mode (at the > prompt) it doesn't mind the comment. oddEdited by CaptainBoing 2017-07-07