home *** CD-ROM | disk | FTP | other *** search
- ; FILE: STOCKS.SC
- ; Version: 2.0
- ; Date: 27 April 1987
- ;
- ;
- ; This is the main script for the STOCKS application. This script
- ; controls the Main menu for the application. Note that each Main
- ; menu item calls a single procedure when selected. The source code
- ; for each procedure is stored in a script file with the name of
- ; the Main menu selection that calls it. In actual practice, all
- ; of the procedures are written to a library, which is the AUTOLIB
- ; for the application.
-
- PROC DoActivity()
- SHOWMENU "Board" : "See Real-Time Price Feed",
- "Portfolio" : "Track Progress of a Specific Portfolio",
- "Holdings" : "Track Aggregate Holdings",
- "TickerTape" : "Watch the ticker tape",
- "Exit" : "Leave Portfolio Management System"
- TO Activity
- SWITCH
- CASE (Activity = "Exit" or Activity = "Esc"):
- RETURN FALSE ;stop execution of the main loop (below)
- CASE (Activity = "Board"):
- SeeBoard()
- CASE (Activity = "Portfolio"):
- Specificport()
- CASE (Activity = "TickerTape"):
- DoTicker()
- CASE (Activity = "Holdings"):
- PortAggr()
- ENDSWITCH
- CLEAR ;clear the canvas after executing a subsystem
- RETURN TRUE ;show the Main menu again
- ENDPROC
-
- ; Since DoActivity has been made into a procedure, and all procedures
- ; are in the AUTOLIB procedure library, the entire script
- ; to play the application consists of:
-
- WHILE (DoActivity()) ;repeat until DoActivity() returns FALSE
- ENDWHILE