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