Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:13 02 Aug 2025 Privacy Policy
Jump to

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.

Forum Index : Microcontroller and PC projects : I'm now a Committed Follower

     Page 2 of 2    
Author Message
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 04:14pm 18 Apr 2022
Copy link to clipboard 
Print this post

  Mixtel90 said  Lol!
GOTO will usually *compile* into fast native code no matter what platform, but it won't necessarily be more efficient in an interpreter.


Yeah, I was shocked, after writing lots of ON-GOTO stuff to find that SELECT CASE was faster  

I have used compilers that create jump-tables for ON-GOTO which are way faster than SELECT CASE.


Craig
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 05:53pm 18 Apr 2022
Copy link to clipboard 
Print this post

Quite a few compilers turn CASE statements into jump tables.

Though in most cases now the CPUs are so fast it really doesn't matter :)

John
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 719
Posted: 06:41pm 18 Apr 2022
Copy link to clipboard 
Print this post

https://www.tutorialspoint.com/execute_basic_online.php

http://www.quitebasic.com/

https://www.calormen.com/jsbasic/  

The ' IDE ' could have numbers
while the program disregards them ?
my site
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7938
Posted: 07:01pm 18 Apr 2022
Copy link to clipboard 
Print this post

If you wrote your BASIC that way then yes. Of course, if BASIC is going to ignore them then you can't GOTO or GOSUB them. It's like using an editor with line numbers.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 07:12pm 18 Apr 2022
Copy link to clipboard 
Print this post

  JohnS said  Quite a few compilers turn CASE statements into jump tables.

Though in most cases now the CPUs are so fast it really doesn't matter :)

John


I could be wrong but I seem to remember that PowerBasic does this. I need to catch up with that product. I kinda lost interest when Bob Zale passed, way too soon.  

Craig
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025