RUN

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 CMM2

Syntax:
RUN
RUN file$ [, cmdline]

Description:

RUN
All devices. Run the program held in flash memory. 

RUN file$
Devices with file systems. Run the program 'file$' held on the SD card. Note that 'file$' must be a string constant (ie, "MYPROG.BAS") including the quotes required around a string constant. 
It cannot be a variable or expression.
Or, if a file name (file$) is supplied, the current program will be erased and that program will be loaded from the current drive and executed. 
This enables one program to load and run another. Example: RUN “TEST.BAS” If an extension is not specified “.BAS” will be added to the file name.

RUN file$ [, cmdline]
CMM2.  If 'cmdline' is specified it will be available to the running program as the string returned by MM.CMDLINE$. 
'cmdline' is not processed by MMBasic so it can contain numbers, commas, quoted strings, etc. 
It is the responsibility of the running program to decode this string of characters. 
'file$' can be omitted and in that case MMBasic will run the "current program name" which is the file last used by RUN, EDIT or AUTOSAVE.
To RUN another program from a current program, use EXECUTE

cl$ = "RUN "+CHR$(34)+file$+CHR$(34)
EXECUTE cl$

Last edited: 30 September, 2020