Category : Paradox DBMS
Archive   : SVOUTP.ZIP
Filename : GRAPHS.ACT

 
Output of file : GRAPHS.ACT contained in archive : SVOUTP.ZIP
;*************************************************************************
; 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",
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
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
199 ³ ³ GraphKey ; Graph_it!
200 ³ ÀÄÄÄENDWHILE
201 ³ G = GetChar() ; Gobble up the keystroke
202 ³ CLEARALL ; clear all table on workspace
203 ÀÄÄÄENDPROC


  3 Responses to “Category : Paradox DBMS
Archive   : SVOUTP.ZIP
Filename : GRAPHS.ACT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/