home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / educ / math / 023 / tabdoc.bas (.txt) < prev    next >
Encoding:
GW-BASIC  |  1989-11-01  |  4.5 KB  |  67 lines

  1. 1  '         TABULATION DOC  ---  TABDOC.BAS  ---  by  Dr Russell Langley
  2. 2  GOTO 400
  3. 4  '<UNK! {000A}>*** Press Key ***
  4. 5  IN$=INKEY$:IF IN$="" THEN 5 ELSE IN$=CHR$(ASC(IN$) AND 95):IF INSTR("LMNS",IN$) THEN RETURN ELSE 5
  5. 339  '<UNK! {000A}>--- Date ---
  6. 340  DAT$=MID$(DATE$,4,2)+" "+MID$("JanFebMarAprMayJunJulAugSepOctNovDec",-2+3*VAL(LEFT$(DATE$,2)),3)+" "+RIGHT$(DATE$,4):RETURN
  7. 399  '<UNK! {000A}>--- Start ---
  8. 400  KEY OFF:SCREEN 0,0,0,0:WIDTH 80:HD$="  TABULATING  QUESTIONNAIRE  DATA  ":VER$="(RL,2)":Q$=CHR$(34)
  9. 401  CLS:GOSUB 340:PRINT DAT$;TAB(40-LEN(HD$)\2);:COLOR 0,7:PRINT HD$;:COLOR 7,0:PRINT TAB(73)VER$:LOCATE 4,1,,0,0:K=10
  10. 402  PRINT TAB(K)"KEYTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENCLOSE"
  11. 403  PRINT TAB(K)"OPEN                                                          OPEN"
  12. 404  PRINT TAB(K)"OPEN    This program tallies questionnaire responses into     OPEN"
  13. 405  PRINT TAB(K)"OPEN      1-way frequency &/or 2-way contingency tables.      OPEN"
  14. 406  PRINT TAB(K)"OPEN                                                          OPEN"
  15. 407  PRINT TAB(K)"OPEN      Max responses (persons x questions) = 20,000.       OPEN"
  16. 408  PRINT TAB(K)"OPEN                                                          OPEN"
  17. 409  PRINT TAB(K)"OPEN    Responses to questions must be single digits, 1-9,    OPEN"
  18. 410  PRINT TAB(K)"OPEN             with 0 entered for `no answer'.              OPEN"
  19. 411  PRINT TAB(K)"OPEN                                                          OPEN"
  20. 412  PRINT TAB(K)"OPEN Persons can be optionally identified by 1-10 characters. OPEN"
  21. 413  PRINT TAB(K)"OPEN                                                          OPEN"
  22. 414  PRINT TAB(K)"OPEN   2-way tables need questions named by 1-10 characters.  OPEN"
  23. 415  PRINT TAB(K)"OPEN                                                          OPEN"
  24. 416  PRINT TAB(K)"OPEN A feature of the program is the easy interactive way of  OPEN"
  25. 417  PRINT TAB(K)"OPEN        getting any number of cross-tabulations.          OPEN"
  26. 418  PRINT TAB(K)"OPEN                                                          OPEN"
  27. 419  PRINT TAB(K)"SCREENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENTHENLOAD":LOCATE 24,1,,7,7
  28. 420  COLOR 14,0:PRINT"Press N for next page, Shift_Prtsc to print this page, or M for Menu. ";:COLOR 7,0
  29. 421  GOSUB 5:IF IN$="N" THEN 423 ELSE IF IN$="M" THEN RUN"MENU" ELSE 421
  30. 422  '<UNK! {000A}>                        --- Page 2 ---
  31. 423  CLS:COLOR 14,0:PRINT TAB(5)HD$TAB(65)"Page 2":COLOR 7,0:PRINT
  32. 424  PRINT"This program requires a special way of entering your data."
  33. 425  PRINT"It must NOT be entered into our `Data Filer & Editor' program, but each person's";
  34. 426  PRINT"data is put in a BASIC DATA statement, starting like this with AUTO 1000,1 :"
  35. 427  PRINT"     1000 REM  ---example data, 7 questions ---"
  36. 428  PRINT"     1001 DATA Smith,1233197           < Responses can be packed or not."
  37. 429  PRINT"     1002 DATA P Jones, 264 451 1      < Spaces are ignored among responses."
  38. 430  PRINT"     1003 DATA #009, 1 1 5 4 0 0 0     < 0 must be used for each `no answer'."
  39. 431  PRINT"     1004 DATA ,10345   27             < ID can be null but comma is essential."
  40. 432  PRINT"     1005 DATA   END                   < End-signal must be in CAPS."
  41. 433  PRINT"     <Ctrl-Break> here to escape from Auto mode.":PRINT
  42. 434  PRINT"2-WAY TABLES also need a Label, comma, & number of choices for each question,"
  43. 435  PRINT"so to do cross-tabs in the above case, replace line 1005 and proceed thus:"
  44. 436  PRINT"     1005 DATA LABELS                  < Says Labels follow (in CAPS)."
  45. 437  PRINT"     1006 DATA Sex,2                   < Sex has 2 valid responses (1 & 2)."
  46. 438  PRINT"     1007 DATA Age Group,7             < Question 2 is Age, coded 1 to 7."
  47. 439  PRINT"     1008 DATA Q3,9                    < Question 3 has 9 options."
  48. 440  PRINT"     :    etc"
  49. 441  PRINT"     1013 DATA END                     < Only LABELS & END have no comma!"
  50. 442  PRINT"     <Ctrl-Break> here to escape from Auto mode.":LOCATE 24,1
  51. 443  COLOR 14,0:PRINT"Press N for next page, L for last page, Shift_Prtsc to print, or M for Menu. ";:COLOR 7,0
  52. 444  GOSUB 5:IF IN$="N" THEN 446 ELSE IF IN$="L" THEN 401 ELSE IF IN$="M" THEN RUN"MENU" ELSE 444
  53. 445  '<UNK! {000A}>                        --- Page 3 ---
  54. 446  CLS:COLOR 15,0:PRINT TAB(5)HD$TAB(65)"Page 3":COLOR 7,0:LOCATE 5,1
  55. 447  PRINT"You can check and edit the datafile that you've created by using the inbuilt"
  56. 448  PRINT"BASIC facilities:  LIST &  EDIT.":PRINT:PRINT
  57. 449  PRINT"When the datafile is ok, SAVE it in Ascii format, like this:":PRINT
  58. 450  PRINT"     SAVE "Q$"A:name.ASC"Q$",A       or      SAVE "Q$"B:name.ASC"Q$",A":PRINT
  59. 451  PRINT"with `name' replaced by a filename of your choice.":PRINT:PRINT
  60. 452  PRINT"Finally, run the main MENU program again, and call up the Tabulating program."
  61. 453  PRINT"Reply to its first question by asking it to MERGE with your special datafile."
  62. 454  PRINT"This will then be done automatically, and you will be reminded to enter the"
  63. 455  PRINT"command `RUN' to execute the program.  That's all!":LOCATE 24,1
  64. 456  COLOR 14,0:PRINT"L for last page, Shift_Prtsc to print, M for Menu, or S to start making file now";:COLOR 7,0
  65. 457  GOSUB 5:IF IN$="L" THEN 423 ELSE IF IN$="M" THEN RUN "MENU.BAS" ELSE IF IN$="S" THEN NEW ELSE 457
  66. 458  END
  67.