Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:31 28 Oct 2026 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 : Easily run favourite programs

Author Message
Briano
Newbie

Joined: 20/01/2026
Location: Canada
Posts: 25
Posted: 10:43pm 27 Oct 2026
Copy link to clipboard 
Print this post

You may already know this, but I didn't.

I can run my favourite program as a commend.
For example, I have "Weather.bas". By adding this code to the library
 
Sub Weather
CHDIR "/"
RUN "Weather"
End Sub


I can now type
Weather
at the command prompt and my weather program will run.

Way cool!
.....Brian
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3418
Posted: 12:10am 28 Oct 2026
Copy link to clipboard 
Print this post

Yes, it's a very useful feature.

You can even use it to make a self modifying program.
A program that learns new stuff can save itself to a file, append the new data to the end of the file as subroutines and perhaps data statements.
The program then RUNs that file which detects the new sub containing extra configuration variables to enable the new features.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3370
Posted: 03:29am 28 Oct 2026
Copy link to clipboard 
Print this post

I was the one who invented the library concept and it never occured to me that it could be used in that way!
It just shows... you can always learn something new.

Geoff
Geoff Graham - http://geoffg.net
 
Volhout

Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 6203
Posted: 07:22am 28 Oct 2026
Copy link to clipboard 
Print this post

Hi Briano,

Nice find. But
*Weather

Will also run the program.

Volhout
PicomiteVGA PETSCII ROBOTS
 
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 2026