Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:08 21 Dec 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 : QuickBasic has COMMON, is it a usual feature ?

Author Message
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 642
Posted: 11:58pm 19 Dec 2025
Copy link to clipboard 
Print this post

To my surprise (being a bit ignorant of BASICs) I see QuickBasic
had a COMMON statement.  
Is that a usual feature of BASICs in general or is it
a special addition ?
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3323
Posted: 02:20am 20 Dec 2025
Copy link to clipboard 
Print this post

COMMON defines a series of variables that are shared with a new program run using the CHAIN command.

I think that COMMON came from Fortran and it was also in GW BASIC which MMBasic imitated.  But it never made it into MMBasic.  This was mostly because the early versions of MMBasic (for the Maximite) shared all variables with the chained program.  Peter's ports of MMBasic followed this practice so COMMON has not been needed.

Geoff
Edited 2025-12-20 12:22 by Geoffg
Geoff Graham - http://geoffg.net
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 508
Posted: 02:20am 20 Dec 2025
Copy link to clipboard 
Print this post

  zeitfest said  To my surprise (being a bit ignorant of BASICs) I see QuickBasic
had a COMMON statement.  
Is that a usual feature of BASICs in general or is it
a special addition ?


It's uncommon for BASIC. Fortran uses it but BASIC, not so much.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1683
Posted: 08:13am 20 Dec 2025
Copy link to clipboard 
Print this post

I found a really cool use for it; My DOS app needed to run certain things without interruption. I reprogrammed the timer interrupt from 55mS to 1mS (compensated to preserve time/date) and hijacked the vector. This was mainly handling I/O in the background. I even had it in a QLB so that, even when I paused or single-stepped the QB code in the IDE, the ISR continued to run.

COMMON: I used this to establish shared variables with the ISR routine. All QB needed to do was read/write the shared variables. Who says "DOS can't do real-time"  

QB was one heck of a product.  
 
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