|
Forum Index : Microcontroller and PC projects : Easily run favourite programs
| Author | Message | ||||
| Briano Newbie Joined: 20/01/2026 Location: CanadaPosts: 25 |
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: AustraliaPosts: 3418 |
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: AustraliaPosts: 3370 |
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: NetherlandsPosts: 6204 |
Hi Briano, Nice find. But *Weather Will also run the program. Volhout PicomiteVGA PETSCII ROBOTS |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |