home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a079 / 1.img / FPDG.LZH / VOL2NUM0 / GETLESS / GETLESS.APP (.txt) < prev    next >
Encoding:
MS Visual FoxPro App  |  1993-02-01  |  41.8 KB  |  401 lines

  1. STATE
  2. POPULATION
  3. GROWTH
  4.  sCalifornia      29321      22.81         New York         17952       2.22         Texas            16991      19.43         Florida          12671      30.04         Pennsylvania     12040       1.55         Illinois         11658       2.06         Ohio             10907       1.07         Michigan          9273       0.18         New Jersey        7736       5.09         North Carolina    6571      11.710        Georgia           6436      17.811        Virginia          6098      14.012        Massachusetts     5913       3.113        Indiana           5593       1.914        Missouri          5159       4.915        Tennessee         4940       7.616        Wisconsin         4867       3.417        Washington        4761      15.218        Maryland          4694      11.319        Louisiana         4382       4.220        Minnesota         4353       6.821        Alabama           4118       5.822        Kentucky          3727       1.823        Arizona           3556      30.824        South Carolina    3512      12.525        Colorado          3317      14.826        Connecticut       3239       4.227        Oklahoma          3224       6.628        Iowa              2840      -2.529        Oregon            2820       7.130        Mississippi       2621       4.031        Kansas            2513       6.332        Arkansas          2406       5.233        West Virginia     1857      -4.834        Utah              1707      16.835        Nebraska          1611       2.636        New Mexico        1528      17.337        Maine             1222       8.738        Hawaii            1112      15.339        Nevada            1111      38.840        New Hampshire     1107      20.341        Idaho             1014       7.442        Rhode Island       998       5.443        Montana            806       2.444        South Dakota       715       3.545        Delaware           673      13.246        North Dakota       660       1.147        D. of C.           604      -5.448        Vermont            567      10.949        Alaska             527      31.150        Wyoming            475       1.151       
  5. STATERANKPOP80GROWTHDELETED
  6. STATE
  7. Washington    
  8. sCalifornia   
  9. sCaliforniayomingisconsinWest Virginia
  10. WashingtonirginiaVermontUtahxasTennesseeDakotaSouth CarolinaRhode IslandPennsylvaniaregonklahomaOhioDakotaorth CarolinaYorkMexicoJerseyw HampshirevadaNebraskaontanaourississippinnesotaichiganssachusettsrylandMaineLouisianaentuckyKansasowandianallinoisIdahoHawaiiGeorgiaFloridaelawareD. of C.nnecticutColoradokansasrizonaskaAlabama
  11. GROWTH
  12. Cffffff?
  13. 3ffffff
  14. .ffffff-
  15. ,*ffffff)'ffffff&
  16. !ffffff
  17. ffffff
  18. ffffff
  19. 333333
  20. ffffff
  21. 333333
  22. 333333
  23. 333333
  24. 333333
  25. ffffff
  26. fffffe
  27. 987610598765432104987654321039876543210298765432101
  28. POPULATION/(1+(GROWTH/100))
  29.     v'bv'
  30. bv'bv
  31. DELETED()
  32. @ @!@"@#@$@%@&@'@(@)@*@+@,@-@.@/@0@1@2@3@
  33. STATE
  34. POP88
  35. POP80
  36.  New York            New York       7352700 7071639    1 Los Angeles         California     3352710 2966850    2 Chicago             Illinois       2977520 3005072    3 Houston             Texas          1698090 1595138    4 Philadelphia        Pennsylvania   1647000 1688210    5 San Diego           California     1070310  875538    6 Detroit             Michigan       1035920 1203339    7 Dallas              Texas           987360  904078    8 San Antonio         Texas           941150  785880    9 Phoenix             Arizona         923750  789704   10 Baltimore           Maryland        751400  786775   11 San Jose            California      738420  629442   12 San Francisco       California      731600  678974   13 Indianapolis        Indiana         727130  700807   14 Memphis             Tennessee       645190  646356   15 Jacksonville        Florida         635430  540920   16 Washington          D. of C.        617000  638333   17 Milwaukee           Wisconsin       599380  636212   18 Boston              Massachusetts   577830  562994   19 Columbus            Ohio            569570  564871   20 New Orleans         Louisiana       531700  557515   21 Cleveland           Ohio            521370  573822   22 El Paso             Texas           510970  425259   23 Seattle             Washington      502200  493846   24 Denver              Colorado        492200  492365   25 Nashville-Davidson  Tennessee       481400  455651   26 Austin              Texas           464690  345496   27 Kansas City         Montana         438950  448159   28 Oklahoma City       Oklahoma        434380  403213   29 Fort Worth          Texas           426610  385164   30 Atlanta             Georgia         420220  425022   31 Portland            Oregon          418470  366383   32 Long Beach          California      415040  361334   33 St. Louis           Montana         403700  453085   34 Tucson              Arizona         385720  330537   35 Albuquerque         New Mexico      378480  331767   36 Honolulu            Hawaii          376110  762874   37 Pittsburgh          Pennsylvania    375230  423938   38 Miami               Florida         371100  346865   39 Cincinnati          Ohio            370480  385457   40 Tulsa               Oklahoma        368330  360919   41 Charlotte           North Carolina  367860  314447   42 Virginia Beach      Virginia        365300  262199   43 Oakland             California      356860  339337   44 Omaha               Nebraska        353170  314255   45 Minneapolis         Minnesota       344670  370951   46 Toledo              Ohio            340760  354635   47 Sacramento          California      338220  275741   48 Newark              New Jersey      313800  329248   49 Buffalo             New York        313570  357870   50 Fresno              California      307090  218202   51 Wichita             Kansas          295320  279272   52 Norfolk             Virginia        286500  266979   53 Colorado Springs    Colorado        283110  215150   54 Louisville          Kentucky        281880  298451   55 Tampa               Florida         281790  271523   56 Mesa                Arizona         280360  152453   57 Birmingham          Alabama         277280  284413   58 Corpus Christi      Texas           260930  231999   59 St. Paul            Minnesota       259110  270230   60 Arlington           Texas           257460  160113   61 Anaheim             California      244670  219311   62 Santa Ana           California      239540  203713   63 St. Petersburg      Florida         235450  238647   64 Baton Rouge         Louisiana       235270  346029   65 Rochester           New York        229780  241741   66 Lexington-Fayette   Kentucky        225700  204165   67 Akron               Ohio            221510  237177   68 Aurora              Colorado        218720  158588   69 Anchorage           Alaska          218500  174431   70 Shreveport          Louisiana       218010  205820   71 Jersey City         New Jersey      217630  223532   72 Richmond            Virginia        213300  219214   73 Riverside           California      210630  170876   74 Las Vegas           Nevada          210620  164674   75 Mobile              Alabama         208820  200452   76 Jackson             Mississippi     201250  202895   77 Montgomery          Alabama         193510  177857   78 Des Moines          Iowa            192910  191003   79 Stockton            California      190680  149779   80 Lubbock             Texas           188090  173979   81 Lincoln             Nebraska        187890  171932   82 Huntington Beach    California      186880  170505   83 Raleigh             North Carolina  186720  150255   84 Grand Rapids        Michigan        185370  181843   85 Yonkers             New York        183000  195351   86 Greensboro          North Carolina  181970  170279   87 Garland             Tex.            180450  138857   88 Little Rock         Arkansas        180090  158461   89 Fort Wayne          Indiana         179810  172196   90 Madison             Wisconsin       178180  170616   91 Dayton              Ohio            178000  203371   92 Columbus            Georgia         177680  169441   93 Knoxville           Tennessee       172080  175030   94 Spokane             Washington      170900  171300   95 Fremont             California      166590  131945   96 Amarillo            Tex.            166010  149230   97 Tacoma              Washington      163960  158501   98 Chattanooga         Tennessee       162670  169565   99 Hialeah             Florida         162080  145254  100
  37. STATE
  38. STATE
  39. Hawaii        
  40. Wisconsin     
  41. HawaiiGeorgiaFloridaD. of C.oloradoCaliforniakansasrizonaskaAlabama
  42. isconsinWashingtonVirginiaasx.TennesseePennsylvaniaregonklahomaOhioorth CarolinaYorkMexicow JerseyvadaNebraskaontanassissippinnesotaichiganssachusettsMarylandLouisianaentuckyKansasowandianaIllinois
  43. SYSMENUz
  44. Census
  45. STATE
  46. Cities
  47. State
  48. DO GoCity    
  49. DO GoState     
  50. WAIT WINDOW NOWAIT "Read Level"+LTRIM(STR(RDLEVEL()))
  51. DO StopIt
  52. SAVEMENU
  53. QUITIT
  54. CENSUS
  55. STATE
  56. CITIES
  57. QUITIT
  58. No cities in list for 
  59. CENSUS
  60. STATE
  61. CITIES
  62. CITIES
  63. CITIES.SPR
  64. CITIES
  65. STATE
  66. STATE
  67. State.SPR
  68. STATE
  69. STOPIT
  70. SETCITY
  71. GOCITY
  72. GOSTATE
  73. _QCV19OPSE_QCV19OPSS
  74. TALKz
  75. COMPATIBLEz
  76. READBORDERz
  77. state
  78. STATE
  79. STATE.PJX
  80. STATE
  81. STATE.SCX
  82. STATE
  83. STATE.MNX
  84. STATE
  85. STATE.PRG
  86. STATE
  87. STATE.FRX
  88. STATE
  89. STATE.QPR
  90. MS Sans Serif
  91. 1989 State Population
  92. state
  93. MS Sans Serif
  94. MS Sans Serif
  95. MS Sans Serif
  96. MS Sans Serif
  97. Rank:
  98. MS Sans Serif
  99. State:
  100. MS Sans Serif
  101. MS Sans Serif
  102. @*HN Next;Prev;Top;Bottom;Quit
  103.  10 year Growth:
  104. MS Sans Serif
  105. '89 Population:
  106. MS Sans Serif
  107. MS Sans Serif
  108. state
  109. SET READBORDER &rborder
  110. CURRAREA
  111. ETALKSTAT
  112. SCOMPSTAT
  113. RBORDER
  114. STATE
  115. CENSUS
  116. POPULATIONGROWTH
  117. CHOICE
  118. _QCV19OQU3_QCV19ORE6&
  119. TALKz
  120. COMPATIBLEz
  121. state
  122. STATE
  123. STATE.PJX
  124. STATE
  125. STATE.SCX
  126. STATE
  127. STATE.MNX
  128. STATE
  129. STATE.PRG
  130. STATE
  131. STATE.FRX
  132. STATE
  133. STATE.QPR
  134. 1989 State Population
  135. state
  136. Rank:
  137. State:
  138. @*HN Next;Prev;Top;Bottom;Quit
  139.  10 year Growth:
  140. '89 Population:
  141. state
  142. CURRAREA
  143. ETALKSTAT
  144. SCOMPSTAT
  145. STATE
  146. CENSUS
  147. POPULATIONGROWTH
  148. IONRANK
  149. CHOICE
  150. _QCV19OSQQ_QCV19OTAH-
  151. End of File Encountered
  152. Beginning of file encountered
  153. CHOICE
  154. EQUITIT
  155. End of File Encountered
  156. Beginning of file encountered
  157. CHOICE
  158. EQUITIT
  159. _QCV19OPSE
  160. _QCV19OPSS
  161. _QCV19OQU3
  162. _QCV19ORE6
  163. _QCV19OSQQ
  164. _QCV19OTAH
  165. _QCZ1DGEUA_QCZ1DGF0HL
  166. TALKz
  167. COMPATIBLEz
  168. READBORDERz
  169. cities
  170. CITIES
  171. CITIES.PJX
  172. CITIES
  173. CITIES.SCX
  174. CITIES
  175. CITIES.MNX
  176. CITIES
  177. CITIES.PRG
  178. CITIES
  179. CITIES.FRX
  180. CITIES
  181. CITIES.QPR
  182. MS Sans Serif
  183. 1988 Cities Population
  184. cities
  185. MS Sans Serif
  186. 3333338@
  187. MS Sans Serif
  188. MS Sans Serif
  189. MS Sans Serif
  190. Rank:
  191. MS Sans Serif
  192. State:
  193. MS Sans Serif
  194. '88 Population:
  195. MS Sans Serif
  196. '80 Population:
  197. MS Sans Serif
  198. MS Sans Serif
  199. @*HN Next;Prev;Top;Bottom;Quit
  200. City:
  201. MS Sans Serif
  202. MS Sans Serif
  203. 3333338@
  204. cities
  205. SET READBORDER &rborder
  206. CURRAREA
  207. ATALKSTAT
  208. HCOMPSTAT
  209. RBORDER
  210. CITIES
  211. SETCITY
  212. CHOICE
  213. STATE
  214. POP88
  215. LPOP80
  216. _QCZ1DH17UCITY
  217. _QCZ1DHJ01_QCZ1DHJ7U}
  218. TALKz
  219. COMPATIBLEz
  220. cities
  221. CITIES
  222. CITIES.PJX
  223. CITIES
  224. CITIES.SCX
  225. CITIES
  226. CITIES.MNX
  227. CITIES
  228. CITIES.PRG
  229. CITIES
  230. CITIES.FRX
  231. CITIES
  232. CITIES.QPR
  233. 1988 Cities Population
  234. cities
  235. Rank:
  236. State:
  237. '88 Population:
  238. '80 Population:
  239. @*HN Next;Prev;Top;Bottom;Quit
  240. City:
  241. cities
  242. CURRAREA
  243. ATALKSTAT
  244. HCOMPSTAT
  245. CITIES
  246. SETCITY
  247. CHOICE
  248. STATE
  249. POP88
  250. POP80
  251. LRANK
  252. _QCZ1DID7CCITY
  253. 17U_QCZ1DIS81_QCZ1DISFS%
  254. End of File Encountered
  255. Beginning of file encountered
  256. CHOICE
  257. AQUITIT
  258. SETCITY
  259. End of File Encountered
  260. Beginning of file encountered
  261. CHOICE
  262. AQUITIT
  263. SETCITY
  264. _QCZ1DGEUA
  265. _QCZ1DGF0H
  266. _QCZ1DH17U
  267. _QCZ1DHJ01
  268. _QCZ1DHJ7U
  269. _QCZ1DID7C
  270. _QCZ1DIS81
  271. _QCZ1DISFS
  272. _QCZ1DJI6N_QCZ1DJICT
  273. TALKz
  274. COMPATIBLEz
  275. READBORDERz
  276. state
  277. STATE
  278. STATE.PJX
  279. STATE
  280. STATE.SCX
  281. STATE
  282. STATE.MNX
  283. STATE
  284. STATE.PRG
  285. STATE
  286. STATE.FRX
  287. STATE
  288. STATE.QPR
  289. MS Sans Serif
  290. 1989 State Population
  291. state
  292. MS Sans Serif
  293. MS Sans Serif
  294. MS Sans Serif
  295. MS Sans Serif
  296. Rank:
  297. MS Sans Serif
  298. State:
  299. MS Sans Serif
  300. MS Sans Serif
  301. @*HN Next;Prev;Top;Bottom;Quit
  302.  10 year Growth:
  303. MS Sans Serif
  304. '89 Population:
  305. MS Sans Serif
  306. MS Sans Serif
  307. state
  308. SET READBORDER &rborder
  309. CURRAREA
  310. NTALKSTAT
  311. TCOMPSTAT
  312.  RBORDER
  313. 8STATE
  314.     CENSUS
  315.    POPULATIONGROWTH
  316.    RANK
  317. CHOICE
  318. _QCZ1DK0BU_QCZ1DKH91&
  319. TALKz
  320. COMPATIBLEz
  321. state
  322. STATE
  323. STATE.PJX
  324. STATE
  325. STATE.SCX
  326. STATE
  327. STATE.MNX
  328. STATE
  329. STATE.PRG
  330. STATE
  331. STATE.FRX
  332. STATE
  333. STATE.QPR
  334. 1989 State Population
  335. state
  336. Rank:
  337. State:
  338. @*HN Next;Prev;Top;Bottom;Quit
  339.  10 year Growth:
  340. '89 Population:
  341. state
  342. CURRAREA
  343. NTALKSTAT
  344. TCOMPSTAT
  345.  STATE
  346. 8CENSUS
  347.    POPULATIONGROWTH
  348. IONRANK
  349.    CHOICE
  350. _QCZ1DL45E_QCZ1DLKLX-
  351. End of File Encountered
  352. Beginning of file encountered
  353. CHOICE
  354. NQUITIT
  355. End of File Encountered
  356. Beginning of file encountered
  357. CHOICE
  358. NQUITIT
  359. _QCZ1DJI6N
  360. _QCZ1DJICT
  361. _QCZ1DK0BU
  362. _QCZ1DKH91
  363. _QCZ1DL45E
  364. _QCZ1DLKLX
  365. Program GETLESS.PRG illustrates a FoxPro Foundation READ. In this example, there are two screens. Also you have access to any of the FoxPro System windows such as the Calendar/Diary, Help, the Calculator and so forth.
  366. FoxPro 2.5 supports another type of READ, called a GET-less or Foundation READ in which there are no GET fields. It is used to manage multiple READ commands and window applications in a single interactive system. The Foundation READ normally has a VALID clause. The clause expression can be a UDF that activates and maintains control over its subordinate READ commands. The VALID clause is activated by any event that would normally terminate a READ command. The event is analyzed in the UDF and only terminates if the event is specifically intended to terminate the Foundation READ. To terminate the system the UDF returns a logical true value (.T.). The UDF returns a false value (.F.) if the Foundation READ is to remains active.
  367. This program uses function keys F3 and F4 to activate screen and F7 to terminate the Foundation READ. ON KEY LABEL commands are used to setup the function keys to execute the appropriate procedures which activate the screens. Pressing the F3 key calls the GoState procedure which executes the STATE.SPR screen program if it is not already active. The screen program is not executed if its window is the foremost window (WONTOP()) or was the last window activated (WLAST()). The objective of this test is to prevent the maximum of five read levels from being exceeded. Function key F7 is used to terminate this program by calling procedure StopIt which clears the READs and sets QuitIt to .F..
  368. The SetCity procedure is called from CITIES.SPR to position the CITIES.DBF database to the record with the same state shown in the STATES window. Figure 9.16 in the book shows the results of running this program. You can use any of the FoxPro accessories with GETLESS.PRG. In the figure, the STATE, CITIES, calculator windows are displayed.
  369. Program GETLESS.PRG consists of two user-defined windows containing @ ... SAYs and GET objects, a program file, and a couple of database files which are listed as follows:
  370. GETLESS.PRG    Main program (Listing 9.9)
  371. CITIES.SPR    Screen program created using the FoxPro Screen Designer (See Listing 9.10)
  372. CITIES.SCX    Database containing the screen design for CITIES.SPR
  373. CITIES.SCT    Memo file for CITIES.SCX
  374. STATE.SCX    Database containing the screen design for STATE.SPR
  375. STATE.SCT    Memo file for STATE.SCX
  376. STATE.SPR    Screen program created using the FoxPro Screen Designer
  377. CENSUS.DBF    Database file containing population for each US state.
  378. CITIES.DBF    Database file containing population for 100 largest US cities.
  379. The two user-defined windows are created using the MODIFY SCREEN command. The CITIES.SPR screen program is submitted for your examination in Listing 9.10. 
  380. The CITIES.SPR screen program, saves some SET parameters, defines the CITIES window, issues some @ commands, and executes the following READ command:
  381. READ CYCLE ;
  382.      ACTIVATE _q81197g9s() ;
  383.      DEACTIVATE _q81197g9y()
  384. This read statement contains an ACTIVATE clause and a DEACTIVATE clause. The ACTIVATE clause is called when the window is opened. It calls a snippet which calls the SETCITY procedure in GETLESS.PRG which selects the CITIES workarea and appropriately positions the CITIES.DBF database.
  385. When the CITIES window is deactivated when another window is selected, READ calls the UDF snippet specified with the DEACTIVATE clause. This snippet clears the READ and returns a true value (.T.) which terminates the READ. The purpose of this code is to prevent the maximum read level from being exceeded. If you do not have this code, the window would be deactivated but the READ would still be active. Then the next time you activate the CITIES window you would add one READ level. Soon the maximum limit of five READ levels would be exceeded.
  386. There is another UDF that is associated with the VALID clause on the @ command that creates the 5 push buttons at the bottom of the window. Whenever you select one of the 5 push buttons, the program calls the UDF to execute some action associated with a push button. The value of the Choice memvar designates which push button was chosen. The code associated with the Quit push button assigns a true value to QuitIt and clears all of the READs except the Foundation READ. Since QuitIt is .T., the Foundation READ also terminates.
  387. f:\jebwin\vol2num0\getless\
  388. CENSUS.DBF
  389. CENSUS.CDX
  390. CITIES.DBF
  391. CITIES.CDX
  392. GETLESS.PRG
  393. h:\foxprow\
  394. GETLESS.FXP
  395. STATE.SPR
  396. STATE.SPX
  397. CITIES.SPR
  398. CITIES.SPX
  399. STATE.SPR
  400. GETLESS.ART
  401.