Posts: 369
Threads: 71
Joined: Jul 2022
Reputation:
14
07-27-2024, 04:16 AM
(This post was last modified: 07-27-2024, 04:33 AM by eoredson.)
Hi,
I have an issue with a metacommand:
$Checking:off
does not allow a line number:
100 $Checking:off
Could some QB64PE editor add the possibility of a line number?
Thanks, Erik.
btw: actually none of the metacommands do.
except for $Dynamic $Static and $Include which require Rem..
Posts: 1,272
Threads: 119
Joined: Apr 2022
Reputation:
100
Why would metacommands need line numbers? In fact why use line numbers at all except when dealing with loading/editing legacy code? I'm not trying to be flippant, it's just that I don't think I've seen anyone creating new projects in the last 10 years using QB64 and line numbers.
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Posts: 3,968
Threads: 177
Joined: Apr 2022
Reputation:
219
good question @TerryRitchie I await to see if Erik does have good reason.
How can it be a compatibility issue with new meta's???
Maybe Erik is coding something that requires Line Numbers for everything? He does seem a bit stuck in the past IMHO. Don't mean disrespect because I am same in reuctance in not exploring _GL nor memory stuff.
b = b + ...
Posts: 369
Threads: 71
Joined: Jul 2022
Reputation:
14
My reasoning is thus:
The code is for Strek from bcg.zip of David Ahl.. (in the games forum).
It is not only QB backward compatible but the original source is line number oriented for basica.com
so I left the line numbers in.. Then I noticed the metacommands not being supported..
No great deal but an interesting question!
Erik.
Posts: 2,696
Threads: 327
Joined: Apr 2022
Reputation:
217
Of course it will hang. You turned off all error checking and error handling, and then you toseed an error. What did you expect to happen?
It's just like tossing all the food and drink out of your house to have a cleaner, barer home. And then you get hungry, and open the fridge to.... just do nothing but drool in hunger.
Checking:off only goes around code that you KNOW is 100% error free.
Posts: 303
Threads: 10
Joined: Apr 2022
Reputation:
44
@eoredson I would clarify that `$Checking:Off` makes code smaller and run faster by removing the code that runs the error handlers, runs timers, runs `On X`, etc. between each line. It's not a general purpose "make the code faster" command, it's for the specific use-cases where the event checking is negatively impacting the performance of a piece of code and you know that the event checking is unnecessary for that part (Because it runs fast enough to not impact timers, won't produce errors, etc.)
I would additionally note that most commands check if there is a pending error before doing anything, so if an error does happen during a `$Checking:Off` block that can basically disable all the code until the program runs a line in a `$Checking:On` section.