home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / PDXOS2-1.ZIP / SAMPLE / STOCKS.SC < prev    next >
Encoding:
Text File  |  1988-12-29  |  1.6 KB  |  43 lines

  1. ; FILE:       STOCKS.SC
  2. ; Version:    2.0
  3. ; Date:       27 April 1987
  4. ;
  5. ;
  6. ; This is the main script for the STOCKS application. This script
  7. ; controls the Main menu for the application. Note that each Main
  8. ; menu item calls a single procedure when selected. The source code
  9. ; for each procedure is stored in a script file with the name of
  10. ; the Main menu selection that calls it.  In actual practice, all
  11. ; of the procedures are written to a library, which is the AUTOLIB
  12. ; for the application.
  13.  
  14. PROC DoActivity()
  15.   SHOWMENU "Board"      : "See Real-Time Price Feed",
  16.            "Portfolio"  : "Track Progress of a Specific Portfolio",
  17.            "Holdings"   : "Track Aggregate Holdings",
  18.            "TickerTape" : "Watch the ticker tape",
  19.            "Exit"       : "Leave Portfolio Management System"
  20.   TO Activity
  21.   SWITCH
  22.     CASE (Activity = "Exit" or Activity = "Esc"):
  23.          RETURN FALSE                ;stop execution of the main loop (below)
  24.     CASE (Activity = "Board"):
  25.          SeeBoard()
  26.     CASE (Activity = "Portfolio"):
  27.          Specificport()
  28.     CASE (Activity = "TickerTape"):
  29.          DoTicker()
  30.     CASE (Activity = "Holdings"):
  31.          PortAggr()
  32.   ENDSWITCH
  33.   CLEAR                              ;clear the canvas after executing a subsystem
  34.   RETURN TRUE                        ;show the Main menu again
  35. ENDPROC
  36.  
  37. ; Since DoActivity has been made into a procedure, and all procedures
  38. ; are in the AUTOLIB procedure library, the entire script
  39. ; to play the application consists of:
  40.  
  41. WHILE (DoActivity())                 ;repeat until DoActivity() returns FALSE
  42. ENDWHILE
  43.