Difference between revisions of "Zbex: Programs in files and in other Dmuse windows"
(created page) |
|||
Line 10: | Line 10: | ||
run | run | ||
− | If you then type "<tt>zz</tt>{{keypress|Enter}}", and type "<tt>TEST.Z</tt>" at the "<tt>Program file?</tt>" prompt, you should see the following lines in your window: | + | If you then type "<tt>zz</tt>{{keypress|Enter}}", and type "<tt>TEST.Z</tt>" at the "<tt>Program file?</tt>" prompt, you should see the following lines in your window (You may need to activate the zbex interpreter with {{keypress|Shft|KeyPad *}} first): |
zz | zz | ||
Current Library is <current directory> | Current Library is <current directory> | ||
Line 19: | Line 19: | ||
Ready for program | Ready for program | ||
− | As before, the line with the numbers tells you that the program successfully compiled; the next line "<tt>Hello World</tt>" is the output from the program; and the "<tt>Ready for program</tt>" prompt tells you that the window is again waiting for you to give it the name of a program to run. | + | As before, the line with the numbers tells you that the program successfully compiled; the next line "<tt>Hello World</tt>" is the output from the program; and the "<tt>Ready for program</tt>" prompt tells you that the window is again waiting for you to give it the name of a program to run. |
== Zbex program executed from another windows == | == Zbex program executed from another windows == |
Revision as of 05:23, 13 October 2010
Contents
Two methods for executing zbex programs from files on the hard disk and from another editing window are described below. Click here for a description of typing and running a program in the current window.
Zbex program executed from a file in the current directory
Let's suppose that you create a file called "TEST.Z" in the current directory, and that this file holds the following two lines of code:
putc Hello World run
If you then type "zz↵ Enter", and type "TEST.Z" at the "Program file?" prompt, you should see the following lines in your window (You may need to activate the zbex interpreter with Shft+KeyPad * first):
zz Current Library is <current directory> Program file? TEST.Z ** S=2, P=8, L=231, M=410 ** Hello World Ready for program
As before, the line with the numbers tells you that the program successfully compiled; the next line "Hello World" is the output from the program; and the "Ready for program" prompt tells you that the window is again waiting for you to give it the name of a program to run.
Zbex program executed from another windows
Suppose window 4 contains the following two lines:
putc Hello World run
You can run this program from your current window by typing "*4" at the "Program file?" prompt. You will then see the following lines in the window:
zz Current Library is <current directory> Program file? *4 ** S=2, P=8, L=231, M=410 ** Hello World Ready for program