Launching One Pro-SiMPLE
Program From Another
By using the system task, it is possible to write a Pro-SiMPLE program that passes execution over to a second program.
To illustrate the technique, the following program:
Do
line color (random (16))
solid color (random (16))
filled circle (random (640), random (480), 25)
If read key ( ) Break
Loop
system ("DAZZLER")
quit
will continue drawing randomly colored circles until any key is pressed.
At that point, it will invoke the DAZZLER program which was presented in
the Micro-SiMPLE tutorial. (For your convenience, the source listing
for the DAZZLER program is replicated here.):
outer loop: Set x = 0
Set y = 0
inner loop: Call solid color (random (16))
Call solid rectangle (x, 0, x + 15, 479)
Call solid rectangle (0, y, 639, y + 11)
Call solid rectangle (639 - x, 0, 624 - x, 479)
Call solid rectangle (0, 479 - y, 639, 468 - y)
Call delay (25)
Call read quit key
Set x = x + 16
Set y = y + 12
If x < 640 Go to inner loop
Go to outer loop
[
Webmaster |
FAQ's |
Home Page |
Contact Us ]