8.02 Running a LynPlex Script Interactively

Entering a script

Press the [Enter] key. The prompt will change from '>' to ':'. You are now ready to enter your first program.

Type the following, pressing [Enter] at the end of each line.

: put "Are you ready"
: put "to learn LynPlex?"

When you press [Enter] on a empty line you will return back to the command prompt.

Viewing a script

Check the program now to see if there are any typing mistakes. Enter the list command. You will see the program that you have entered.

To be implemented. If there are, use up-arrow or down-arrow to find the previously typed lines. Use right-arrow or left-arrow to move inside the line. Fix the problem and press ENTER.

Running the script

When you are ready to see the program in action, type:

> run

The screen will change to the output window and the output from your program will be displayed.

Are you ready
to learn BASIC?
<< end of program >>
Press any key to continue ...

Press any key and you will return to the console window.

You can switch between the two windows by pressing F12.

Editing the script

Although the above method can be used to create a script it is very limited. It is much better to use a good text editor.

Save the script with a file extension of .plex.

Running an external script

Once you have created a script in a text editor you can run it interactively.

Navigate to the folder where you have saved the script using the cd command.

> cd ../tests

In this example you will run a script called myprog.plex.

> run myprog

or the run command may be abbreviated:

> /myprog

lynplex/lp0802.txt · Last modified: 2011/09/08 16:07 (external edit)