

     c:\disk\samples\stocks.act   03/03/89 10:22 pm   Page - 1


     ;*************************************************************************
     ; Action Diagram
     ; Date : 03/03/89
     ; Time : 10:22:23 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\stocks.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

         1     ; FILE:       STOCKS.SC
         2     ; Version:    3.0
         3     ; Date:       12 December 1988
         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 ³       CANVAS OFF
        16 ³       CLEARALL CLEAR                 ; Clear all tables on canvas and workspaces
        17 ³       PAINTCANVAS ATTRIBUTE 31 0,0,24,79
        18 ³       STYLE ATTRIBUTE 30
        19 ³       @4,0
        20 ³       TEXT
        21 ³       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
        22 ³       º °°°° STOCKS APPLICATION °°°°°°°°°°°°°°°°°°°°°°°°°°°°°° MAIN MENU °°°°°°°°°°° º
        23 ³       ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÒÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¶
        24 ³       º  BOARD         º   The table of stocks shown with realtime updates.          º
        25 ³       ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
        26 ³       º  PORTFOLIO     º   Stock market activity in realtime for a single portfolio. º
        27 ³       ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
        28 ³       º  HOLDINGS      º   Watches stock market activity in all your portfolio.      º
        29 ³       ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
        30 ³       º  TICKERTAPE    º   Ticker tape showing the latest prices for all the stocks. º
        31 ³       ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
        32 ³       º  GRAPHS        º   Watch realtime graphs of your portfolio.                  º
        33 ³       ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
        34 ³       º  EXIT          º   Exit Stocks Application and return to Paradox.            º
        35 ³       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
        36 ³       ENDTEXT
        37 ³       PAINTCANVAS ATTRIBUTE 78 5,7,5,24              ; Paint "Stock Application"
        38 ³       PAINTCANVAS ATTRIBUTE 14 5,57,5,65             ; Paint "Main Menu"
        39 ³       CANVAS ON
        40 ³
        41 ³       STYLE
        42 ³       SHOWMENU "Board"      : "See RealTime Price Feed",
        43 ³           "Portfolio"  : "Track Progress of a Specific Portfolio",
        44 ³           "Holdings"   : "Track Aggregate Holdings",
        45 ³           "TickerTape" : "Watch the ticker tape",
        46 ³           "Graphs"     : "See RealTime graph of your portfolio",
        47 ³           "Exit"       : "Leave Portfolio Management System"
        48 ³       TO Activity
        49 ³   ÚÄÄÄSWITCH
        50 ³   ÃÄÄÄÄÄÄÄCASE (Activity = "Exit" or Activity = "Esc"):
        51 <ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄRETURN FALSE                ;stop execution of the main loop (below)
        52 ³   ÃÄÄÄÄÄÄÄCASE (Activity = "Board"):
        53 ³   ³           SeeBoard()
        54 ³   ÃÄÄÄÄÄÄÄCASE (Activity = "Portfolio"):
        55 ³   ³           Specificport()
        56 ³   ÃÄÄÄÄÄÄÄCASE (Activity = "TickerTape"):
        57 ³   ³           DoTicker()
        58 ³   ÃÄÄÄÄÄÄÄCASE (Activity = "Holdings"):







     c:\disk\samples\stocks.act   03/03/89 10:22 pm   Page - 2


        59 ³   ³           PortAggr()
        60 ³   ÃÄÄÄÄÄÄÄCASE (Activity = "Graphs"):
        61 ³   ³           DoGraph()
        62 ³   ÀÄÄÄENDSWITCH
        63 <ÄÄÄÄÄÄÄRETURN TRUE                        ;show the Main menu again
        64 ÀÄÄÄENDPROC
        65
        66     ; Since DoActivity has been made into a procedure, and all procedures
        67     ; are in the AUTOLIB procedure library, the entire script
        68     ; to play the application consists of:
        69
        70     AutoLib = "Paradox"
        71 ÚÄÄÄIF (NOT IsFile("Paradox.lib"))
        72 ³       THEN
        72 <ÄÄÄÄÄÄÄRETURN "Please play the MKLIB script to create the application library"
        73 ÀÄÄÄENDIF
        74
        75 ÕÍÍÍWHILE (DoActivity())                 ;repeat until DoActivity() returns FALSE
        76 ÀÄÄÄENDWHILE


























































     c:\disk\samples\board.act   03/03/89 10:22 pm   Page - 3


     ;*************************************************************************
     ; Action Diagram
     ; Date : 03/03/89
     ; Time : 10:22:24 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\board.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

         1     ;SCRIPT:       BOARD.SC
         2     ;Version:      3.0
         3     ;Date:         04 November 1988
         4     ;
         5     ;
         6     ; The procedures in this script handle the display of the "main board,"
         7     ; the table of stocks shown with real-time updates. Since the table may
         8     ; be larger than one display screen in length, it is shown in "pages,"
         9     ; with each page being displayed for a short period of time before moving
        10     ; on to the next page.
        11     ;
        12     ; SeeBoard is the main procedure here, and controls the initial display
        13     ; of the "main board." It uses the ShowNSleep procedure to display
        14     ; additional pages of the board, if any.
        15
        16 ÚÄÄÄPROC CLOSED SeeBoard()
        17 ³       PRIVATE nstocks,nscreens,i
        18 ³       CLEARALL                 ; make sure that the workspace is clear
        19 ³       VIEW "price"             ; Main Board consists of the Price table shown in real time
        20 ³       MOVETO [Chg]
        21 ³       MOVETO [Ticker]          ; position so that Ticker is first field showing
        22 ³       ECHO NORMAL
        23 ³       PROMPT "Real Time Stock Feed", "Press Any Key to Quit"
        24 ³       nstocks = Nrecords("Price")              ; How many stocks to display?
        25 ³   ÚÄÄÄIF (MOD(nstocks, 22) <> 0)               ; We can fit 22 stocks on a screen
        26 ³   ³       THEN nscreens = Int(nstocks/22) + 1   ;   Need extra screen for spillover
        27 ³   ÃÄÄÄELSE nscreens = nstocks/22            ;   No spillover stocks
        28 ³   ÀÄÄÄENDIF
        29 ³
        30 ³   ÕÍÍÍWHILE (NOT Charwaiting())           ; If user types anything, leave
        31 ³   ³   ÚÄÄÄIF (nscreens > 1)                 ; Only need to use ShowNSleep if more than 1 screen
        32 ³   ³   ³       THEN
        33 ³   ³   ³       ShowNSleep("Down", nscreens)
        34 ³   ³   ³       ShowNSleep("Up", nscreens)
        35 ³   ³   ÃÄÄÄELSE SleepRefresh()             ; Update the information on the single screen
        36 ³   ³   ÀÄÄÄENDIF
        37 ³   ÀÄÄÄENDWHILE
        38 ³
        39 ³       ; To get here, user must have typed a character:
        40 ³
        41 ³       ECHO OFF                            ; No more updating needed
        42 ³
        43 ³       x = Getchar()                       ; Gobble up the character typed
        44 ³       CLEARALL                            ; Clear the workspace
        45 ÀÄÄÄENDPROC
        46
        47     ; ShowNSleep steps through the "main board" screens one at a time,
        48     ; using SleepRefresh to pause and refresh the information displayed.
        49
        50 ÚÄÄÄPROC ShowNSleep(Direction, TotScreen)
        51 ³   ÕÍÍÍFOR i FROM 1 TO TotScreen-1         ; For each screen we have to display
        52 ³   ³   ÚÄÄÄIF (Charwaiting())                ; | - Make sure user didn't ask to leave
        53 ³   ³   ³       THEN
        53 <ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄRETURN                     ; |
        54 ³   ³   ÀÄÄÄENDIF                             ; |
        55 ³   ³       SleepRefresh()                    ; | - Display and update the information
        56 ³   ³   ÚÄÄÄIF (Direction = "Up")             ; |
        57 ³   ³   ³       THEN PGUP                      ; | - Move to previous page if we're heading back







     c:\disk\samples\board.act   03/03/89 10:22 pm   Page - 4


        58 ³   ³   ÃÄÄÄELSE PGDN                      ; | - Move to next page if we're heading forward through pages
        59 ³   ³   ÀÄÄÄENDIF                             ; v
        60 ³   ÀÄÄÄENDFOR
        61 ÀÄÄÄENDPROC
        62
        63     ; SleepRefresh performs a 3 second SLEEP with an explicit table refresh
        64     ; in the middle of the period
        65
        66 ÚÄÄÄPROC SleepRefresh()
        67 ³       SLEEP 1500               ; SLEEP for 1.5 seconds
        68 ³       REFRESH                  ; Force an update of the information
        69 ³       SLEEP 1500               ; SLEEP for 1.5 more seconds
        70 ÀÄÄÄENDPROC
































































     c:\disk\samples\graphs.act   03/03/89 10:22 pm   Page - 5


     ;*************************************************************************
     ; Action Diagram
     ; Date : 03/03/89
     ; Time : 10:22:24 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\graphs.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

         1     ; File:         GRAPHS.SC
         2     ; Version:      3.0
         3     ; Date:         9 December 1988
         4
         5     ; This script defines the procedures that display different type of graphs.
         6     ; DoGraph is the controlling procedure.
         7
         8 ÚÄÄÄPROC GraphMenu ()
         9 ³       PAINTCANVAS ATTRIBUTE 31 0,0,24,79
        10 ³       STYLE ATTRIBUTE 30
        11 ³       @5,0
        12 ³       TEXT
        13 ³       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
        14 ³       º °°°° STOCKS APPLICATION °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°° GRAPH MENU °°°°°° º
        15 ³       ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÒÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¶
        16 ³       º  StockPrices          º  Current, low, high prices in "High Tech" portfolio. º
        17 ³       ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
        18 ³       º  PortfolioComposition º  "High Tech" stocks' contribution to portfolio value.º
        19 ³       ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
        20 ³       º  StockOwned           º  Number of shares of stock owned, by portfolio.      º
        21 ³       ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
        22 ³       º  PortfolioValue       º  Total value of each portfolio.                      º
        23 ³       ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
        24 ³       º  MainMenu             º  Exit Graph Menu and return to MainMenu.             º
        25 ³       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
        26 ³       ENDTEXT
        27 ³       PAINTCANVAS ATTRIBUTE 78 6,7,6,24
        28 ³       PAINTCANVAS ATTRIBUTE 94 6,61,6,70
        29 ³       STYLE
        30 ÀÄÄÄENDPROC
        31
        32 ÚÄÄÄPROC SaveOldGraph(Mode)
        33 ³       Private Mode
        34 ³   ÚÄÄÄIF Mode = "Begin" THEN
        35 ³   ³   ÚÄÄÄIF not isfile("ZZZZGR1.G") THEN
        36 ³   ³   ³       MENU {Image} {Graph} {Save} {ZZZZGR1}
        37 ³   ³   ÀÄÄÄENDIF
        38 ³   ³       Startgraph = True
        39 ³   ÃÄÄÄELSE
        40 ³   ³       MENU {Image} {Graph} {Load} {ZZZZGR1}
        41 ³   ³       RUN NOREFRESH "Erase ZZZZGR1.G"               ; Run with NoReFresh
        42 ³   ÀÄÄÄENDIF
        43 ÀÄÄÄENDPROC
        44
        45 ÚÄÄÄPROC CLOSED DoGraph()
        46 ³       CURSOR OFF
        47 ³       StartGraph = False
        48 ³   ÕÍÍÍWHILE (True)
        49 ³   ³       CANVAS OFF                      ; Turn Canvas OFF to prevent flashing
        50 ³   ³       CLEAR RESET
        51 ³   ³       GraphMenu()                     ; Print Main graph Menu box
        52 ³   ³       CANVAS ON                       ; Turn Canvas back on with menu selection
        53 ³   ³
        54 ³   ³       SHOWMENU
        55 ³   ³           "StockPrices" :
        56 ³   ³           "Current, low, and high prices for High Tech portfolio stocks",
        57 ³   ³           "PortfolioComposition" :
        58 ³   ³           "Pie chart showing High Tech stocks contributions to portfolio value",







     c:\disk\samples\graphs.act   03/03/89 10:22 pm   Page - 6


        59 ³   ³           "StocksOwned" :
        60 ³   ³           "Number of shares of each stock owned, by portfolio",
        61 ³   ³           "PortfolioValue" :
        62 ³   ³           "Total value of all portfolios",
        63 ³   ³           "MainMenu" :
        64 ³   ³           "Exit Graph Menu and return to Main Menu"
        65 ³   ³       TO GraphChoice
        66 ³   ³
        67 ³   ³   ÚÄÄÄSWITCH
        68 ³   ³   ÃÄÄÄÄÄÄÄCASE GraphChoice = "MainMenu" OR GraphChoice = "Esc" :
        69 ³   ³   ³       ÚÄÄÄIF StartGraph THEN
        70 ³   ³   ³       ³       SaveOldGraph("End")
        71 ³   ³   ³       ÀÄÄÄENDIF
        72 ³   ³   ³           CANVAS OFF
        73 <ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄRETURN
        74 ³   ³   ³           CANVAS ON
        75 ³   ³   ÃÄÄÄÄÄÄÄCASE GraphChoice = "StockPrices" :
        76 ³   ³   ³           SaveOldGraph("Begin")
        77 ³   ³   ³           STYLE ATTRIBUTE 31
        78 ³   ³   ³           @ 19, 1 ?? Format ("W78,AC","Query in progress, one moment please....")
        79 ³   ³   ³           STYLE
        80 ³   ³   ³           Graph1()
        81 ³   ³   ÃÄÄÄÄÄÄÄCASE GraphChoice = "PortfolioComposition" :
        82 ³   ³   ³           SaveOldGraph("Begin")
        83 ³   ³   ³           STYLE ATTRIBUTE 31
        84 ³   ³   ³           @ 19, 1 ?? Format ("W78,AC","Query in progress, one moment please....")
        85 ³   ³   ³           STYLE
        86 ³   ³   ³           Graph4()
        87 ³   ³   ÃÄÄÄÄÄÄÄCASE GraphChoice = "StocksOwned" :
        88 ³   ³   ³           SaveOldGraph("Begin")
        89 ³   ³   ³           STYLE ATTRIBUTE 31
        90 ³   ³   ³           @ 19, 1 ?? Format ("W78,AC","Query in progress, one moment please....")
        91 ³   ³   ³           STYLE
        92 ³   ³   ³           Graph3()
        93 ³   ³   ÃÄÄÄÄÄÄÄCASE GraphChoice = "PortfolioValue" :
        94 ³   ³   ³           SaveOldGraph("Begin")
        95 ³   ³   ³           STYLE ATTRIBUTE 31
        96 ³   ³   ³           @ 19, 1 ?? Format ("W78,AC","Query in progress, one moment please....")
        97 ³   ³   ³           STYLE
        98 ³   ³   ³           Graph2()
        99 ³   ³   ÀÄÄÄENDSWITCH
       100 ³   ÀÄÄÄENDWHILE
       101 ÀÄÄÄENDPROC
       102
       103 ÚÄÄÄPROC CLOSED Graph1 ()               ; Graph for Stockprices Menu
       104 ³       PRIVATE Qorder
       105 ³       ; Graph #1: Low,High,current (Bar,Marker,and Over-ride)   graph1.g
       106 ³       MENU {Image} {Graph} {Load} {Graph1}      ; Load in the Customize graph
       107 ³       CLEARALL                          ; Clearall table on workspace
       108 ³
       109 ³       Qorder = QueryOrder()             ; Save old QueryOrder to restore later
       110 ³   ÚÄÄÄIF Qorder = "TableOrder" THEN
       111 ³   ³       SETQUERYORDER IMAGEORDER        ; Set new QueryOrder to ImageOrder
       112 ³   ÀÄÄÄENDIF
       113 ³
       114 ³       QUERY
       115 ³
       116 ³          Price |   TICKER   | PRICE  |  LOW   |  HIGH  |
       117 ³                | Check _Tic | Check  | Check  | Check  |
       118 ³
       119 ³          Holding | PORTFOLIO | SYMBOL |
       120 ³                  | High Tech | _Tic   |
       121 ³
       122 ³       ENDQUERY
       123 ³   ÕÍÍÍWHILE NOT CharWaiting()
       124 ³   ³       DO_IT!
       125 ³   ³       MOVETO [Price]                  ; Moveto a numeric field for graph
       126 ³   ³       GraphKey                        ; Graph_it!
       127 ³   ÀÄÄÄENDWHILE
       128 ³       G = GetChar()                     ; Gobble up the keystroke







     c:\disk\samples\graphs.act   03/03/89 10:22 pm   Page - 7


       129 ³
       130 ³   ÚÄÄÄIF Qorder = "TableOrder" THEN
       131 ³   ³       SETQUERYORDER TABLEORDER        ; Restore back the old QueryOrder
       132 ³   ÀÄÄÄENDIF
       133 ³       CLEARALL                          ; Clear all tables on workspace
       134 ÀÄÄÄENDPROC
       135
       136 ÚÄÄÄPROC CLOSED Graph2 ()        ; Graph for PortfolioValue Menu
       137 ³       ;Graph #2: Total value of each portfolio (3-D Bar)   graph2.g
       138 ³       MENU {Image} {Graph} {Load} {Graph2}      ; Load Customize graph
       139 ³   ÕÍÍÍWHILE NOT CharWaiting()
       140 ³   ³       CLEARALL                          ; Clearall Table on workspace
       141 ³   ³       PortPric()                        ; Do a first query to get share price from Holding.sc
       142 ³   ³       DO_IT!
       143 ³   ³       CLEARALL                          ; Clear workspace
       144 ³   ³       PortSum()                         ; Do a second query for total in each portfolio
       145 ³   ³       DO_IT!
       146 ³   ³       MOVETO [Total Share Price]        ; Moveto Numeric field for grah
       147 ³   ³       GraphKey                          ; Graph_It!
       148 ³   ÀÄÄÄENDWHILE
       149 ³       G = GetChar()
       150 ³       CLEARALL
       151 ÀÄÄÄENDPROC
       152
       153 ÚÄÄÄPROC CLOSED Graph3 ()               ; Graph for StocksOwned Menu
       154 ³       PRIVATE Qorder
       155 ³       ; Graph #3: Using CrossTab Table to graph (Stacked Bar)  graph3.g
       156 ³       MENU {Image} {Graph} {Load} {Graph3}      ; Load Customize graph
       157 ³       CLEARALL                          ; Clearall table on workspace
       158 ³
       159 ³       Qorder = QueryOrder()             ; Save old QueryOrder to restore later
       160 ³   ÚÄÄÄIF Qorder = "TableOrder" THEN
       161 ³   ³       SETQUERYORDER IMAGEORDER        ; Set new QueryOrder to ImageOrder
       162 ³   ÀÄÄÄENDIF
       163 ³
       164 ³       QUERY
       165 ³
       166 ³          Holding | SYMBOL | PORTFOLIO | SHARES |
       167 ³                  | Check  | Check     | Check  |
       168 ³
       169 ³       ENDQUERY
       170 ³       DO_IT!
       171 ³
       172 ³       MOVETO [Symbol]                   ; Move to Alpha field for crosstab
       173 ³       CROSSTABKEY                       ; Do a sum CrossTab by default
       174 ³       GraphKey                          ; Graph it
       175 ³       G = GetChar()                     ; Gobble up the keystroke
       176 ³
       177 ³   ÚÄÄÄIF Qorder = "TableOrder" THEN
       178 ³   ³       SETQUERYORDER TABLEORDER        ; Restore back the old QueryOrder
       179 ³   ÀÄÄÄENDIF
       180 ³       CLEARALL
       181 ÀÄÄÄENDPROC
       182
       183 ÚÄÄÄPROC CLOSED Graph4 ()               ; Graph for PortfolioComposition Menu
       184 ³       ; Graph #4: Stock Contribution  (Pie chart)   graph4.g
       185 ³       MENU {Image} {Graph} {Load} {Graph4}      ; Load Customize graph
       186 ³       CLEARALL                          ; Clearall table on workspace
       187 ³       QUERY
       188 ³
       189 ³          Price |   TICKER   | PRICE |
       190 ³                | Check _tic | _p    |
       191 ³
       192 ³          Holding | PORTFOLIO | SYMBOL |             SHARES             |
       193 ³                  | High Tech | _tic   | _SH,CALC _SH*_P AS Total Value |
       194 ³
       195 ³       ENDQUERY
       196 ³   ÕÍÍÍWHILE NOT CharWaiting()
       197 ³   ³       DO_IT!
       198 ³   ³       MOVETO [Total Value]            ; Move to numeric field for graph







     c:\disk\samples\graphs.act   03/03/89 10:22 pm   Page - 8


       199 ³   ³       GraphKey                        ; Graph_it!
       200 ³   ÀÄÄÄENDWHILE
       201 ³       G = GetChar()                     ; Gobble up the keystroke
       202 ³       CLEARALL                          ; clear all table on workspace
       203 ÀÄÄÄENDPROC








































































     c:\disk\samples\holdings.act   03/03/89 10:22 pm   Page - 9


     ;*************************************************************************
     ; Action Diagram
     ; Date : 03/03/89
     ; Time : 10:22:26 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\holdings.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

         1     ; SCRIPT:     HOLDINGS.SC
         2     ; Version:    3.0
         3     ; Date:       04 November 1988
         4     ;
         5     ;
         6     ; The Holdings selection uses queries to find out the current aggregate
         7     ; value of your portfolios.  Note how the queries are used to full
         8     ; advantage to reduce the amount of programming necessary to summarize
         9     ; the information. PortAggr is the controlling procedure.
        10
        11 ÚÄÄÄPROC CLOSED PortAggr()
        12 ³       CLEAR                       ; PAL canvas should be clear when we start
        13 ³
        14 ³   ÕÍÍÍWHILE NOT Charwaiting()     ; Keep updating until user presses a key
        15 ³   ³       Portpric()                ; The first query gets current prices for our portfolio
        16 ³   ³   ÕÍÍÍWHILE (TRUE)
        17 ³   ³   ³       LOCK "Price" WL         ; Can we get Price table?
        18 ³   ³   ³   ÚÄÄÄIF (retval) THEN
        18 ³   ³   <ÄÄÄÄÄÄÄÄÄÄÄQUITLOOP
        18 ³   ³   ³   ÀÄÄÄENDIF ; yes, so go on
        19 ³   ³   ³       SLEEP 500               ; pause before trying again
        20 ³   ³   ÀÄÄÄENDWHILE
        21 ³   ³       DO_IT!                    ; perform the query
        22 ³   ³       UNLOCK "Price" WL
        23 ³   ³       PortSum()  DO_IT!         ; The second query summarizes the information obtained from the first query
        24 ³   ³       CLEARALL                  ; Done with queries, get them off the workspace
        25 ³   ³       VIEW "Answer"             ; But put the summary information (query 2) back on
        26 ³   ³       ECHO NORMAL               ; Turning ECHO NORMAL lets us see the workspace in PROMPT command
        27 ³   ³       PROMPT "Portfolio Pricing System - Using Real Time Feed",
        28 ³   ³       "Latest update time is " + TIME() + "  --  Any key to stop"
        29 ³   ³       ECHO OFF                  ; Turning ECHO OFF insures that next query won't be seen!
        30 ³   ÀÄÄÄENDWHILE
        31 ³
        32 ³       ; If we get here, user must have pressed a key (and wants to leave module)
        33 ³
        34 ³       x=Getchar()           ; Gobble up the character
        35 ³       CLEARALL              ; Clear up the workspace
        36 ÀÄÄÄENDPROC
        37
        38     ; PortPric puts a query regarding our current portfolio and the current
        39     ; main board information onto the workspace.
        40
        41 ÚÄÄÄPROC PortPric()
        42 ³       QUERY
        43 ³
        44 ³        Price | TICKER | PRICE |  LAST  |
        45 ³              | _tick  | _p    | Check  |
        46 ³
        47 ³        Holding | PORTFOLIO |   SYMBOL    |       SHARES       |
        48 ³                | Check     | Check _tick | _sh, calc _p * _sh |
        49 ³
        50 ³       ENDQUERY
        51 ÀÄÄÄENDPROC
        52
        53     ; PortSum puts a query onto the workspace that takes the information
        54     ; from the PortPric query (now in the ANSWER table) and summarizes it
        55     ; for display. Note the following:
        56     ;    - calc max: last update occurred when the last stock traded







     c:\disk\samples\holdings.act   03/03/89 10:22 pm   Page - 10


        57     ;    - calc count: number of stocks in the portfolio
        58     ;    - calc sum: value of the portfolio as of last update
        59
        60 ÚÄÄÄPROC PortSum()
        61 ³
        62 ³       QUERY
        63 ³
        64 ³        Answer | LAST                      | PORTFOLIO |   SYMBOL   | PRICE * SHARES                |
        65 ³               | calc max as "Last Update" | Check     | calc count | calc sum as Total Share Price |
        66 ³
        67 ³       ENDQUERY
        68 ³
        69 ÀÄÄÄENDPROC
































































     c:\disk\samples\portfol.act   03/03/89 10:22 pm   Page - 11


     ;*************************************************************************
     ; Action Diagram
     ; Date : 03/03/89
     ; Time : 10:22:27 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\portfol.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

         1     ; SCRIPT:     PORTFOL.SC
         2     ; Version:    3.0
         3     ; Date:       04 November 1988
         4     ;
         5     ;
         6     ; This script defines the procedures that display a summary of holdings
         7     ; in a specific portfolio (as requested by the user). It functions
         8     ; in a similar manner to HOLDINGS.
         9
        10 ÚÄÄÄPROC PortMenu()
        11 ³       CLEAR
        12 ³       PAINTCANVAS ATTRIBUTE 31 0,0,24,79
        13 ³       STYLE ATTRIBUTE 30
        14 ³       @5,0
        15 ³       TEXT
        16 ³       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
        17 ³       º °°°° STOCKS APPLICATION °°°°°°°°°°°°°°°°°°°°°°°°° PORTFOLIO MENU °°°°°°°°°°° º
        18 ³       ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÒÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¶
        19 ³       º  Auto Industry  º   Use Auto Industry Portfolio.                             º
        20 ³       ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
        21 ³       º  Blue Chip      º   Use Blue Chip Portfolio.                                 º
        22 ³       ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
        23 ³       º  High Tech      º   Use High Tech Industry Portfolio.                        º
        24 ³       ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¹
        25 ³       º  MainMenu       º   Exit Porfolio Menu and return to Main Menu.              º
        26 ³       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
        27 ³       ENDTEXT
        28 ³       PAINTCANVAS ATTRIBUTE 78 6,7,6,24
        29 ³       PAINTCANVAS ATTRIBUTE 46 6,52,6,65
        30 ³       STYLE
        31 ÀÄÄÄENDPROC
        32
        33 ÚÄÄÄPROC CLOSED SpecificPort()
        34 ³       PRIVATE x
        35 ³       Cursor OFF
        36 ³   ÚÄÄÄIF (NOT AskPortName())               ; Get a portfolio name from user
        37 ³   ³       THEN
        37 <ÄÄÄÄÄÄÄÄÄÄÄRETURN                        ; User didn't supply name, so return
        38 ³   ÀÄÄÄENDIF
        39 ³   ÕÍÍÍWHILE (NOT Charwaiting())            ; For as long as user doesn't press key
        40 ³   ³       CLEARALL                           ; | - clear the workspace
        41 ³   ³       SpecQuery1()                       ; | - put the portfolio query on workspace
        42 ³   ³   ÕÍÍÍWHILE (TRUE)                       ; |
        43 ³   ³   ³       LOCK "Price" WL                  ; | - can we get the table?
        44 ³   ³   ³   ÚÄÄÄIF (retval) THEN
        44 ³   ³   <ÄÄÄÄÄÄÄÄÄÄÄQUITLOOP
        44 ³   ³   ³   ÀÄÄÄENDIF  ; |  yes, so go on
        45 ³   ³   ³       SLEEP 500                        ; |  no, so pause before retrying
        46 ³   ³   ÀÄÄÄENDWHILE                           ; |
        47 ³   ³       DO_IT!                             ; | - process the query
        48 ³   ³       UNLOCK "Price" WL                  ; | - give up lock on table
        49 ³   ³       CLEARALL                           ; |
        50 ³   ³       VIEW "Answer"                      ; | - take the resultant ANSWER table and...
        51 ³   ³       MOVETO [Total Share Price]         ; |
        52 ³   ³       MOVETO [Ticker]                    ; |
        53 ³   ³       ECHO NORMAL                        ; | - turn on ECHO to see results
        54 ³   ³       PROMPT "Portfolio for " + portname + " as of " + Time(),
        55 ³   ³       "Total Portfolio value is $" +







     c:\disk\samples\portfol.act   03/03/89 10:22 pm   Page - 12


        56 ³   ³       FORMAT("W12,AL,EC",Csum("Answer", "Total Share Price")) +
        57 ³   ³       "   --      Press Any Key to Quit"
        58 ³   ³       ECHO OFF                           ; | - turn off ECHO so user doesn't see next query
        59 ³   ÀÄÄÄENDWHILE                              ; Return to top of the loop
        60 ³
        61 ³       ; If we drop out of above loop, user must have pressed a key
        62 ³
        63 ³       x = Getchar()                         ; Gobble up the keystroke
        64 ³       CLEARALL                              ; And erase the workspace
        65 ³       CLEAR                                 ;    ...and canvas
        66 ÀÄÄÄENDPROC
        67
        68     ; SpecQuery1 puts the query that does all the work onto the workspace.
        69     ; Note:
        70     ;    - the tilde variable ~portname supplies the portfolio name
        71     ;    - calc _p * _sh calculates total value for a stock
        72
        73 ÚÄÄÄPROC SpecQuery1()
        74 ³
        75 ³       QUERY
        76 ³
        77 ³        Price |   TICKER    |  PRICE   |  LAST  |
        78 ³              | Check _tick | Check _p | Check  |
        79 ³
        80 ³        Holding | PORTFOLIO | SYMBOL |          SHARES                               |
        81 ³                | ~portname | _tick  | Check _sh, calc _p * _sh as Total Share Price |
        82 ³
        83 ³       ENDQUERY
        84 ÀÄÄÄENDPROC
        85
        86     ; AskPortName does the job of requesting and accepting from the user the
        87     ; name of the portfolio to display a summary of.
        88
        89 ÚÄÄÄPROC AskPortName()
        90 ³       PRIVATE n,Nams,Prompts
        91 ³       ; First we must get the names of the Portfolios
        92 ³       MENU {Ask} SELECT "Holding"        ; HOLDING table has names of portfolios
        93 ³       MOVETO [Portfolio]                 ; Portfolio names are in Portfolio Field
        94 ³       CHECK                              ; So CHECK that field
        95 ³       DO_IT!                             ; and perform a query to get names into table
        96 ³       n = Nrecords("Answer")             ; User has n portfolios (names now in Answer)
        97 ³       ARRAY Nams[n+1]                    ; Create an array to put the names into
        98 ³       ARRAY Prompts[n+1]                 ; And another array to store prompts for names
        99 ³   ÕÍÍÍSCAN                               ; SCAN through each record of Answer to fill arrays
       100 ³   ³       Nams[ Recno() ]    = [Portfolio]
       101 ³   ³       Prompts[ Recno() ] = "Use the " + [Portfolio] + " portfolio"
       102 ³   ÀÄÄÄENDSCAN
       103 ³       Nams[n+1] = "MainMenu"
       104 ³       Prompts[n+1] = "Exit out of Portfolio Menu and return to Main Menu"
       105 ³       CLEARALL
       106 ³
       107 ³       CANVAS OFF
       108 ³       PortMenu()                         ; Print Portfolio Menu Box
       109 ³       CANVAS ON
       110 ³       SHOWARRAY Nams Prompts   111 ³       TO Portname  ; Display portfolio names in a Paradox-style menu
       112 <ÄÄÄÄÄÄÄRETURN(Portname <> "Esc" and Portname <> "MainMenu")
       113 ³
       114 ÀÄÄÄENDPROC



















     c:\disk\samples\ticker.act   03/03/89 10:22 pm   Page - 13


     ;*************************************************************************
     ; Action Diagram
     ; Date : 03/03/89
     ; Time : 10:22:28 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\ticker.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

         1     ; SCRIPT:     TICKER.SC
         2     ; Version:    3.0
         3     ; Date:       04 November 1988
         4     ;
         5     ;
         6     ; TICKER contains the procedures that create a "tickertape" display of
         7     ; the stocks in the PRICE table.
         8
         9 ÚÄÄÄPROC AddChar(s)            ; Add the next characters and display ticker
        10 ³       PRIVATE l,i
        11 ³       l = Len(s)               ; Need to know how many character are added to string
        12 ³   ÕÍÍÍFOR i FROM 1 TO l        ; so that we loop right number of times...
        13 ³   ³       Toprint = Substr(Toprint,2, 50) + Substr(s,i,1)   ; add char to ticker line
        14 ³   ³       @12,15 ?? Toprint      ; Ticker string goes on line 12
        15 ³   ³       SLEEP Delay            ; Short pause, otherwise ticker moves too fast
        16 ³   ÀÄÄÄENDFOR
        17 ÀÄÄÄENDPROC
        18
        19 ÚÄÄÄPROC TickerTape()
        20 ³       PRIVATE Toprint,x,Delay,BetweenRefresh
        21 ³       Toprint = Spaces(80)
        22 ³       Delay = 100
        23 ³       BetweenRefresh = 5
        24 ³       VIEW "price"             ; We get ticker info from the PRICE table
        25 ³   ÕÍÍÍWHILE (TRUE)             ; Loop until user presses character
        26 ³   ³   ÕÍÍÍSCAN                   ; Use SCAN to move through stocks in table
        27 ³   ³   ³   ÚÄÄÄIF (Charwaiting())      ; Did user press a key?
        28 ³   ³   ³   ³       THEN  x = Getchar()   ; Yes, so let's see what they typed
        29 ³   ³   ³   ³   ÕÍÍÍWHILE (Charwaiting())
        30 ³   ³   ³   ³   ³       Y = Getchar()
        31 ³   ³   ³   ³   ÀÄÄÄENDWHILE
        32 ³   ³   ³   ³   ÚÄÄÄSWITCH
        33 ³   ³   ³   ³   ÃÄÄÄÄÄÄÄCASE x = 45:          ; a minus was typed
        34 ³   ³   ³   ³   ³           Delay = Delay + 50  ; meaning they want the ticker slower
        35 ³   ³   ³   ³   ÃÄÄÄÄÄÄÄCASE x = 43:          ; a plus was typed
        36 ³   ³   ³   ³   ³           Delay = Max(Delay-50,0)  ; so make the ticker faster
        37 ³   ³   ³   ³   ÃÄÄÄÄÄÄÄOTHERWISE:        ; user wants to leave
        38 ³   ³   ³   ³   ³           CLEARALL
        38 <ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄRETURN ;   Clear up the workspace and go back to Main menu
        39 ³   ³   ³   ³   ÀÄÄÄENDSWITCH
        40 ³   ³   ³   ÀÄÄÄENDIF                   ; No, so continue SCAN
        41 ³   ³   ³   ÚÄÄÄIF (Mod(Recno(),BetweenRefresh) = 1)
        42 ³   ³   ³   ³       THEN REFRESH          ; Refresh every BetweenRefresh records
        43 ³   ³   ³   ÀÄÄÄENDIF
        44 ³   ³   ³       AddChar([Ticker] + " " + strval([Price]) +  "   ") ; Add stock name and price to ticker
        45 ³   ³   ÀÄÄÄENDSCAN
        46 ³   ÀÄÄÄENDWHILE
        47 ÀÄÄÄENDPROC
        48
        49     ; DoTicker is the controlling procedure and performs a few housekeeping
        50     ; chores before calling the routine to display stock information.
        51
        52 ÚÄÄÄPROC CLOSED DoTicker()
        53 ³       CLEAR                     ; PAL canvas needs to be cleared for ticker
        54 ³       CURSOR OFF                ; Cursor not needed in this subsystem, so turn it off
        55 ³       PAINTCANVAS ATTRIBUTE 0 12,14,14,70        ; for Shadow Box
        56 ³       PAINTCANVAS FILL (" ") 12,13,13,67         ; clear window
        57 ³       PAINTCANVAS BORDER FILL(" ") ATTRIBUTE 78 11,12,13,68   ; for frame







     c:\disk\samples\ticker.act   03/03/89 10:22 pm   Page - 14


        58 ³       TickerTape()              ; and start the tape...
        59 ³       CLEAR                     ; Get ticker off display before going back to Main menu
        60 ÀÄÄÄENDPROC










































































     c:\disk\samples\stocks.cll   03/03/89 10:22 pm   Page - 15


     ;*************************************************************************
     ; Procedure Call Tree
     ; Date : 03/03/89
     ; Time : 10:22:30 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : D:\PARADOX3\SAMPAPP\STOCKS.SC
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

             STOCKS.SC
     (    1)   º
     (    2)   º
     (    3)   ºÍÍ PROC DOACTIVITY() <line 14>
     (    4)   º    º
     (    5)   º    ÇÄÄ seeboard() <line 53>
     (    6)   º    º    º
     (    7)   º    º    ÇÄÄ shownsleep() <line 33>
     (    8)   º    º    º    º
     (    9)   º    º    º    ÓÄÄ sleeprefresh() <line 55>
     (   10)   º    º    º
     (   11)   º    º    ÇÄÄ shownsleep() <line 34>
     (   12)   º    º    º  ...relations shown at (7)
     (   13)   º    º    º
     (   14)   º    º    ÓÄÄ sleeprefresh() <line 35>
     (   15)   º    º       ...relations shown at (9)
     (   16)   º    º
     (   17)   º    ÇÄÄ specificport() <line 55>
     (   18)   º    º    º
     (   19)   º    º    ÇÄÄ askportname() <line 36>
     (   20)   º    º    º    º
     (   21)   º    º    º    ÓÄÄ portmenu() <line 108>
     (   22)   º    º    º
     (   23)   º    º    ÓÄÄ specquery1() <line 41>
     (   24)   º    º
     (   25)   º    ÇÄÄ doticker() <line 57>
     (   26)   º    º    º
     (   27)   º    º    ÓÄÄ tickertape() <line 58>
     (   28)   º    º         º
     (   29)   º    º         ÓÄÄ addchar() <line 44>
     (   30)   º    º
     (   31)   º    ÇÄÄ portaggr() <line 59>
     (   32)   º    º    º
     (   33)   º    º    ÇÄÄ portpric() <line 15>
     (   34)   º    º    º
     (   35)   º    º    ÓÄÄ portsum() <line 23>
     (   36)   º    º
     (   37)   º    ÓÄÄ dograph() <line 61>
     (   38)   º         º
     (   39)   º         ÇÄÄ graphmenu() <line 51>
     (   40)   º         º
     (   41)   º         ÇÄÄ saveoldgraph() <line 70>
     (   42)   º         º
     (   43)   º         ÇÄÄ saveoldgraph() <line 76>
     (   44)   º         º  ...relations shown at (41)
     (   45)   º         º
     (   46)   º         ÇÄÄ graph1() <line 80>
     (   47)   º         º
     (   48)   º         ÇÄÄ saveoldgraph() <line 82>
     (   49)   º         º  ...relations shown at (41)
     (   50)   º         º
     (   51)   º         ÇÄÄ graph4() <line 86>
     (   52)   º         º
     (   53)   º         ÇÄÄ saveoldgraph() <line 88>
     (   54)   º         º  ...relations shown at (41)
     (   55)   º         º
     (   56)   º         ÇÄÄ graph3() <line 92>
     (   57)   º         º







     c:\disk\samples\stocks.cll   03/03/89 10:22 pm   Page - 16


     (   58)   º         ÇÄÄ saveoldgraph() <line 94>
     (   59)   º         º  ...relations shown at (41)
     (   60)   º         º
     (   61)   º         ÓÄÄ graph2() <line 98>
     (   62)   º              º
     (   63)   º              ÇÄÄ portpric() <line 141>
     (   64)   º              º  ...relations shown at (33)
     (   65)   º              º
     (   66)   º              ÓÄÄ portsum() <line 144>
     (   67)   º                 ...relations shown at (35)
     (   68)   º
     (   69)   ÇÄÄ doactivity() <line 75>
     (   70)   º  ...relations shown at (3)
     (   71)   º

     (   72) BOARD.SC <line 0>
     (   73)   º
     (   74)   ºÍÍ PROC SEEBOARD() <line 16>
     (   75)   º  ...relations shown at (5)
     (   76)   º
     (   77)   ºÍÍ PROC SHOWNSLEEP() <line 50>
     (   78)   º  ...relations shown at (7)
     (   79)   º
     (   80)   ºÍÍ PROC SLEEPREFRESH() <line 66>
     (   81)   º  ...relations shown at (9)
     (   82)   º

     (   83) GRAPHS.SC <line 0>
     (   84)   º
     (   85)   ºÍÍ PROC GRAPHMENU() <line 8>
     (   86)   º  ...relations shown at (39)
     (   87)   º
     (   88)   ºÍÍ PROC SAVEOLDGRAPH() <line 32>
     (   89)   º  ...relations shown at (41)
     (   90)   º
     (   91)   ºÍÍ PROC DOGRAPH() <line 45>
     (   92)   º  ...relations shown at (37)
     (   93)   º
     (   94)   ºÍÍ PROC GRAPH1() <line 103>
     (   95)   º  ...relations shown at (46)
     (   96)   º
     (   97)   ºÍÍ PROC GRAPH2() <line 136>
     (   98)   º  ...relations shown at (61)
     (   99)   º
     (  100)   ºÍÍ PROC GRAPH3() <line 153>
     (  101)   º  ...relations shown at (56)
     (  102)   º
     (  103)   ºÍÍ PROC GRAPH4() <line 183>
     (  104)   º  ...relations shown at (51)
     (  105)   º

     (  106) HOLDINGS.SC <line 0>
     (  107)   º
     (  108)   ºÍÍ PROC PORTAGGR() <line 11>
     (  109)   º  ...relations shown at (31)
     (  110)   º
     (  111)   ºÍÍ PROC PORTPRIC() <line 41>
     (  112)   º  ...relations shown at (33)
     (  113)   º
     (  114)   ºÍÍ PROC PORTSUM() <line 60>
     (  115)   º  ...relations shown at (35)
     (  116)   º

     (  117) PORTFOL.SC <line 0>
     (  118)   º
     (  119)   ºÍÍ PROC PORTMENU() <line 10>
     (  120)   º  ...relations shown at (21)
     (  121)   º
     (  122)   ºÍÍ PROC SPECIFICPORT() <line 33>
     (  123)   º  ...relations shown at (17)







     c:\disk\samples\stocks.cll   03/03/89 10:22 pm   Page - 17


     (  124)   º
     (  125)   ºÍÍ PROC SPECQUERY1() <line 73>
     (  126)   º  ...relations shown at (23)
     (  127)   º
     (  128)   ºÍÍ PROC ASKPORTNAME() <line 89>
     (  129)   º  ...relations shown at (19)
     (  130)   º

     (  131) TICKER.SC <line 0>
     (  132)   º
     (  133)   ºÍÍ PROC ADDCHAR() <line 9>
     (  134)   º  ...relations shown at (29)
     (  135)   º
     (  136)   ºÍÍ PROC TICKERTAPE() <line 19>
     (  137)   º  ...relations shown at (27)
     (  138)   º
     (  139)   ºÍÍ PROC DOTICKER() <line 52>
     (  140)      ...relations shown at (25)



























































     c:\disk\samples\stocks.rep   03/03/89 10:22 pm   Page - 18


     ;*************************************************************************
     ; Procedure Calls/Caller Report
     ; Date : 03/03/89
     ; Time : 10:22:31 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\stocks.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

     Procedure Definition Summary


     Procedure                         Line
     ----------------------           -----

     DOACTIVITY                         14
     STOCKS.SC                           0

























































     c:\disk\samples\stocks.rep   03/03/89 10:22 pm   Page - 19


     Procedure Call Report


     Procedure                Calls/Defines               Line   Type
     ----------------------   -------------------------  -----   ---------

     DOACTIVITY
                              seeboard                      53   Call
                              specificport                  55   Call
                              doticker                      57   Call
                              portaggr                      59   Call
                              dograph                       61   Call
     STOCKS.SC
                              doactivity                    14   Definition
                              doactivity                    75   Call






























































     c:\disk\samples\stocks.rep   03/03/89 10:22 pm   Page - 20


     Procedure Caller Report


     Procedure                Occurs in                   Line   Type
     ----------------------   -------------------------  -----   ---------

     DOACTIVITY
                              stocks.sc                     14   Definition
                              stocks.sc                     75   Call
     DOGRAPH
                              doactivity                    61   Call
     DOTICKER
                              doactivity                    57   Call
     PORTAGGR
                              doactivity                    59   Call
     SEEBOARD
                              doactivity                    53   Call
     SPECIFICPORT
                              doactivity                    55   Call


























































     c:\disk\samples\board.rep   03/03/89 10:22 pm   Page - 21


     ;*************************************************************************
     ; Procedure Calls/Caller Report
     ; Date : 03/03/89
     ; Time : 10:22:31 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\board.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

     Procedure Definition Summary


     Procedure                         Line
     ----------------------           -----

     BOARD.SC                            0
     SEEBOARD                           16
     SHOWNSLEEP                         50
     SLEEPREFRESH                       66























































     c:\disk\samples\board.rep   03/03/89 10:22 pm   Page - 22


     Procedure Call Report


     Procedure                Calls/Defines               Line   Type
     ----------------------   -------------------------  -----   ---------

     BOARD.SC
                              seeboard                      16   Definition
                              shownsleep                    50   Definition
                              sleeprefresh                  66   Definition
     SEEBOARD
                              shownsleep                    33   Call
                              shownsleep                    34   Call
                              sleeprefresh                  35   Call
     SHOWNSLEEP
                              sleeprefresh                  55   Call
     SLEEPREFRESH




























































     c:\disk\samples\board.rep   03/03/89 10:22 pm   Page - 23


     Procedure Caller Report


     Procedure                Occurs in                   Line   Type
     ----------------------   -------------------------  -----   ---------

     SEEBOARD
                              board.sc                      16   Definition
     SHOWNSLEEP
                              seeboard                      33   Call
                              seeboard                      34   Call
                              board.sc                      50   Definition
     SLEEPREFRESH
                              seeboard                      35   Call
                              shownsleep                    55   Call
                              board.sc                      66   Definition





























































     c:\disk\samples\graphs.rep   03/03/89 10:22 pm   Page - 24


     ;*************************************************************************
     ; Procedure Calls/Caller Report
     ; Date : 03/03/89
     ; Time : 10:22:32 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\graphs.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

     Procedure Definition Summary


     Procedure                         Line
     ----------------------           -----

     DOGRAPH                            45
     GRAPH1                            103
     GRAPH2                            136
     GRAPH3                            153
     GRAPH4                            183
     GRAPHMENU                           8
     GRAPHS.SC                           0
     SAVEOLDGRAPH                       32



















































     c:\disk\samples\graphs.rep   03/03/89 10:22 pm   Page - 25


     Procedure Call Report


     Procedure                Calls/Defines               Line   Type
     ----------------------   -------------------------  -----   ---------

     DOGRAPH
                              graphmenu                     51   Call
                              saveoldgraph                  70   Call
                              saveoldgraph                  76   Call
                              graph1                        80   Call
                              saveoldgraph                  82   Call
                              graph4                        86   Call
                              saveoldgraph                  88   Call
                              graph3                        92   Call
                              saveoldgraph                  94   Call
                              graph2                        98   Call
     GRAPH1
     GRAPH2
                              portpric                     141   Call
                              portsum                      144   Call
     GRAPH3
     GRAPH4
     GRAPHMENU
     GRAPHS.SC
                              graphmenu                      8   Definition
                              saveoldgraph                  32   Definition
                              dograph                       45   Definition
                              graph1                       103   Definition
                              graph2                       136   Definition
                              graph3                       153   Definition
                              graph4                       183   Definition
     SAVEOLDGRAPH












































     c:\disk\samples\graphs.rep   03/03/89 10:22 pm   Page - 26


     Procedure Caller Report


     Procedure                Occurs in                   Line   Type
     ----------------------   -------------------------  -----   ---------

     DOGRAPH
                              graphs.sc                     45   Definition
     GRAPH1
                              dograph                       80   Call
                              graphs.sc                    103   Definition
     GRAPH2
                              dograph                       98   Call
                              graphs.sc                    136   Definition
     GRAPH3
                              dograph                       92   Call
                              graphs.sc                    153   Definition
     GRAPH4
                              dograph                       86   Call
                              graphs.sc                    183   Definition
     GRAPHMENU
                              graphs.sc                      8   Definition
                              dograph                       51   Call
     PORTPRIC
                              graph2                       141   Call
     PORTSUM
                              graph2                       144   Call
     SAVEOLDGRAPH
                              graphs.sc                     32   Definition
                              dograph                       70   Call
                              dograph                       76   Call
                              dograph                       82   Call
                              dograph                       88   Call
                              dograph                       94   Call











































     c:\disk\samples\holdings.rep   03/03/89 10:22 pm   Page - 27


     ;*************************************************************************
     ; Procedure Calls/Caller Report
     ; Date : 03/03/89
     ; Time : 10:22:33 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\holdings.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

     Procedure Definition Summary


     Procedure                         Line
     ----------------------           -----

     HOLDINGS.SC                         0
     PORTAGGR                           11
     PORTPRIC                           41
     PORTSUM                            60























































     c:\disk\samples\holdings.rep   03/03/89 10:22 pm   Page - 28


     Procedure Call Report


     Procedure                Calls/Defines               Line   Type
     ----------------------   -------------------------  -----   ---------

     HOLDINGS.SC
                              portaggr                      11   Definition
                              portpric                      41   Definition
                              portsum                       60   Definition
     PORTAGGR
                              portpric                      15   Call
                              portsum                       23   Call
     PORTPRIC
     PORTSUM






























































     c:\disk\samples\holdings.rep   03/03/89 10:22 pm   Page - 29


     Procedure Caller Report


     Procedure                Occurs in                   Line   Type
     ----------------------   -------------------------  -----   ---------

     PORTAGGR
                              holdings.sc                   11   Definition
     PORTPRIC
                              portaggr                      15   Call
                              holdings.sc                   41   Definition
     PORTSUM
                              portaggr                      23   Call
                              holdings.sc                   60   Definition































































     c:\disk\samples\portfol.rep   03/03/89 10:22 pm   Page - 30


     ;*************************************************************************
     ; Procedure Calls/Caller Report
     ; Date : 03/03/89
     ; Time : 10:22:34 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\portfol.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

     Procedure Definition Summary


     Procedure                         Line
     ----------------------           -----

     ASKPORTNAME                        89
     PORTFOL.SC                          0
     PORTMENU                           10
     SPECIFICPORT                       33
     SPECQUERY1                         73






















































     c:\disk\samples\portfol.rep   03/03/89 10:22 pm   Page - 31


     Procedure Call Report


     Procedure                Calls/Defines               Line   Type
     ----------------------   -------------------------  -----   ---------

     ASKPORTNAME
                              portmenu                     108   Call
     PORTFOL.SC
                              portmenu                      10   Definition
                              specificport                  33   Definition
                              specquery1                    73   Definition
                              askportname                   89   Definition
     PORTMENU
     SPECIFICPORT
                              askportname                   36   Call
                              specquery1                    41   Call
     SPECQUERY1



























































     c:\disk\samples\portfol.rep   03/03/89 10:22 pm   Page - 32


     Procedure Caller Report


     Procedure                Occurs in                   Line   Type
     ----------------------   -------------------------  -----   ---------

     ASKPORTNAME
                              specificport                  36   Call
                              portfol.sc                    89   Definition
     PORTMENU
                              portfol.sc                    10   Definition
                              askportname                  108   Call
     SPECIFICPORT
                              portfol.sc                    33   Definition
     SPECQUERY1
                              specificport                  41   Call
                              portfol.sc                    73   Definition




























































     c:\disk\samples\ticker.rep   03/03/89 10:22 pm   Page - 33


     ;*************************************************************************
     ; Procedure Calls/Caller Report
     ; Date : 03/03/89
     ; Time : 10:22:35 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\ticker.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

     Procedure Definition Summary


     Procedure                         Line
     ----------------------           -----

     ADDCHAR                             9
     DOTICKER                           52
     TICKER.SC                           0
     TICKERTAPE                         19























































     c:\disk\samples\ticker.rep   03/03/89 10:22 pm   Page - 34


     Procedure Call Report


     Procedure                Calls/Defines               Line   Type
     ----------------------   -------------------------  -----   ---------

     ADDCHAR
     DOTICKER
                              tickertape                    58   Call
     TICKER.SC
                              addchar                        9   Definition
                              tickertape                    19   Definition
                              doticker                      52   Definition
     TICKERTAPE
                              addchar                       44   Call






























































     c:\disk\samples\ticker.rep   03/03/89 10:22 pm   Page - 35


     Procedure Caller Report


     Procedure                Occurs in                   Line   Type
     ----------------------   -------------------------  -----   ---------

     ADDCHAR
                              ticker.sc                      9   Definition
                              tickertape                    44   Call
     DOTICKER
                              ticker.sc                     52   Definition
     TICKERTAPE
                              ticker.sc                     19   Definition
                              doticker                      58   Call































































     c:\disk\samples\stocks.xrf   03/03/89 10:22 pm   Page - 36


     ;*************************************************************************
     ; Variable Cross Reference
     ; Sorted by Variable
     ; Date : 03/03/89
     ; Time : 10:22:35 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\stocks.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

     Variable        Line ('=' indicates modification)
     ------------    ---------------------------------------------------------------
         ACTIVITY:    48=    50     50     52     54     56     58     60

     Statistics
     ==============================
     Total Variables        : 8
     Total Unique Variables : 1
























































     c:\disk\samples\board.xrf   03/03/89 10:22 pm   Page - 37


     ;*************************************************************************
     ; Variable Cross Reference
     ; Sorted by Variable
     ; Date : 03/03/89
     ; Time : 10:22:36 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\board.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

     Variable        Line ('=' indicates modification)
     ------------    ---------------------------------------------------------------
            [CHG]:    20
         [TICKER]:    21
        DIRECTION:    50     56
                I:    17     51=
         NSCREENS:    17     26=    27=    31     33     34
          NSTOCKS:    17     24=    25     26     27
        TOTSCREEN:    50     51
                X:    43=

     Statistics
     ==============================
     Total Variables        : 20
     Total Unique Variables : 8

















































     c:\disk\samples\graphs.xrf   03/03/89 10:22 pm   Page - 38


     ;*************************************************************************
     ; Variable Cross Reference
     ; Sorted by Variable
     ; Date : 03/03/89
     ; Time : 10:22:36 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\graphs.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

     Variable        Line ('=' indicates modification)
     ------------    ---------------------------------------------------------------
          [PRICE]:   125
         [SYMBOL]:   172
     [TOTAL SHARE PRICE]:
                     146
     [TOTAL VALUE]:
                     198
                G:   128=   149=   175=   201=
      GRAPHCHOICE:    65=    68     68     75     81     87     93
             MODE:    32     33     34
           QORDER:   104    109=   110    130    154    159=   160    177
       STARTGRAPH:    38=    47=    69

     Statistics
     ==============================
     Total Variables        : 29
     Total Unique Variables : 9














































     c:\disk\samples\holdings.xrf   03/03/89 10:22 pm   Page - 39


     ;*************************************************************************
     ; Variable Cross Reference
     ; Sorted by Variable
     ; Date : 03/03/89
     ; Time : 10:22:37 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\holdings.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

     Variable        Line ('=' indicates modification)
     ------------    ---------------------------------------------------------------
               WL:    17     22
                X:    34=

     Statistics
     ==============================
     Total Variables        : 3
     Total Unique Variables : 2























































     c:\disk\samples\portfol.xrf   03/03/89 10:22 pm   Page - 40


     ;*************************************************************************
     ; Variable Cross Reference
     ; Sorted by Variable
     ; Date : 03/03/89
     ; Time : 10:22:37 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\portfol.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

     Variable        Line ('=' indicates modification)
     ------------    ---------------------------------------------------------------
      [PORTFOLIO]:    93    100    101
         [TICKER]:    52
     [TOTAL SHARE PRICE]:
                      51
                N:    90     96=    97     98    103    104
             NAMS:    90    110
           NAMS[]:    97    100    103
         PORTNAME:    54    110=   111    111
          PROMPTS:    90    110
        PROMPTS[]:    98    101    104
               WL:    43     48
                X:    34     63=

     Statistics
     ==============================
     Total Variables        : 29
     Total Unique Variables : 11













































     c:\disk\samples\ticker.xrf   03/03/89 10:22 pm   Page - 41


     ;*************************************************************************
     ; Variable Cross Reference
     ; Sorted by Variable
     ; Date : 03/03/89
     ; Time : 10:22:38 pm
     ;
     ; System : Paradox3 Toolkit Samples
     ; File Name : d:\paradox3\sampapp\ticker.sc
     ; By : Borland International
     ; Last modified 12/21/88  01:00:02 am
     ; Copyright (c) 1988  Borland International
     ;*************************************************************************

     Variable        Line ('=' indicates modification)
     ------------    ---------------------------------------------------------------
          [PRICE]:    44
         [TICKER]:    44
     BETWEENREFRESH:
                      20     23=    41
            DELAY:    15     20     22=    34=    34     36=    36
                I:    10     12=    13
                L:    10     11=    12
                S:     9     11     13
          TOPRINT:    13=    13     14     20     21=
                X:    20     28=    33     35
                Y:    30=

     Statistics
     ==============================
     Total Variables        : 31
     Total Unique Variables : 10












































