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.
Fredd Newbie Joined: 26/09/2023 Location: South AfricaPosts: 4
Posted: 10:55am 06 Oct 2023
Copy link to clipboard
Print this post
Here is a bit of information learnt the hard way. If you have a command to write a line of text on an LCD as BITBANG LCD (2, 1, "some text") instead of BITBANG LCD 2, 1, "some text" nothing will be displayed and all other correct lcd display commands will fail until the program is restarted. This will not be flagged as an error.
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4150
Posted: 01:43pm 06 Oct 2023
Copy link to clipboard
Print this post
I think it confuses the MMBasic parser.
Probably sees the whole of the part in parens as one expression with a weird construction and value.
Or even that there's a function call LCD(...) and equally confuses it.
Every error could be detected but the code would balloon in size (*) and would it fit any more?
(*) and/or need a big re-write
It's tough to make things foolproof (as the saying goes but I'll stop here).
John
Fredd Newbie Joined: 26/09/2023 Location: South AfricaPosts: 4
Posted: 09:45am 08 Oct 2023
Copy link to clipboard
Print this post
Thanks JohnS I suspected something like that when I found the problem. No criticism intended, just passing on some information that shouldnt be needed if you write the code properly. I made that mistake after having used a different Basic that required the brackets for the the last 15 years .
Fredd
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4150
Posted: 01:29pm 08 Oct 2023
Copy link to clipboard
Print this post
Ohhh... BASICs do tend to vary more than various other languages. Especially when crammed into limited memory on a uC (PIC32 originally for MMBasic).