Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
32
Task/Metaprogramming/Run-BASIC/metaprogramming.basic
Normal file
32
Task/Metaprogramming/Run-BASIC/metaprogramming.basic
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
' ---------------------------------------------------
|
||||
' create a file to be run
|
||||
' RB can run the entire program
|
||||
' or execute a function withing the RUNNED program
|
||||
' ---------------------------------------------------
|
||||
open "runned.bas" for output as #f ' open runned.bas as output
|
||||
|
||||
print #f, "text$ = ""I'm rinning the complete program. ' print this program to the output
|
||||
Or you can run a function.
|
||||
The program or function within the RUNNED program
|
||||
can execute all Run BASIC commands."""
|
||||
|
||||
print #f, "
|
||||
x = displayText(text$)"
|
||||
|
||||
print #f, " ' besides RUNNING the entireprogram
|
||||
Function displayText(text$) ' we will execute this function only
|
||||
print text$ '
|
||||
end function"
|
||||
|
||||
' ----------------------------------------
|
||||
' Execute the entire RUNNED program
|
||||
' ----------------------------------------
|
||||
RUN "runned.bas",#handle ' setup run command to execute runned.bas and give it a handle
|
||||
render #handle ' render the handle will execute the program
|
||||
|
||||
' ----------------------------------------
|
||||
' Execute a function in the RUNNED program
|
||||
' ----------------------------------------
|
||||
RUN "runned.bas",#handle ' setup run command to execute runned.bas and give it a handle
|
||||
#handle displayText("Welcome!") ' only execute the function withing the runned program
|
||||
render #handle ' render the handle will execute the program
|
||||
Loading…
Add table
Add a link
Reference in a new issue