1! Program INSTLG.BAS Version 1 June, 1976 This is the utility program for creating and editing large (32 steps, 128 lines) INSTn.TXT files (INST1.TXT thru INST3.TXT) 2! Department of Psychology Lawrence University Appleton, Wisconsin, 54911 (414) 739-3681, Ext. 464 3! Copyright (C) 1975, 1976 by Francis Campos. General permission to copy or modify, but not for profit, all or part of this document or the software described herein is hereby 4! granted, provided that this copyright notice is given, and reference is made to the fact that reproduction privileges were granted by permission of Francis Campos, Lawrence University. 5! Although every effort has been made to insure the accuracy and usefulness of this document and the software described herein, neither the author(s), Lawrence University, nor its funding 6! sources make any warranty, expressed or implied, with respect to the performance or features of same on equipment which Lawrence neither owns nor controls. 7! This program is one of the twenty-one BASIC-PLUS programs and eighteen virtual core files that comprise the CASANOVA package for Computer ASsisted instruction in ANalysis Of 8! VAriance. The package is coded for use on a PDP 11/40, 45 or 70 computer operating under RSTS/E, V6A-02. Those who wish to adapt the package to other systems and/or programming languages are 9! urged to consult the BASIC-PLUS Language Manual, published by the Digital Equipment Corporation, Maynard, Massachusetts, 01754, as well as the Instructor's Manual for CASANOVA, provided by Lawrence. 20 ON ERROR GOTO 1010 30 PRINT"CASANOVA INSTRUCTION FILE WRITER - LARGE VERSION 40 &:INPUT"TEXT FILE NUMBER";A1$ 42 IF A1$>"3" THEN 1020 50 A1$="INST"+A1$+".TXT" 60 OPEN A1$ AS FILE 1 70 DIM #1, A$(128)=64 80 INPUT"NEW OR OLD";A3$ 90 IF A3$="NEW" THEN 100 ELSE 210 100 &"ENTER LINES OF TEXT USING LESS THAN 62 CHARACTERS. 110 &"DO NOT USE COMMAS OR SEMICOLONS. USE 'HALT' TO SEPARATE 120 &"STEPS. USE 'HALT123456789' TO END TEXT. 130 & 140 I1=0:I2=0:I3=0 150 I1=I1+1 160 PRINT"L:";I1 170 INPUTA2$ 180 A$(I1)=A2$ 190 IF A2$="HALT123456789" THEN 200 ELSE 150 200 &:&"END OF TEXT", 210 INPUT"LIST THE TEXT";A3$ 220 IF A3$="N" THEN 280 230 I1=0 240 I1=I1+1: PRINT I1; A$(I1) 250 IF A$(I1)="HALT123456789" THEN 270 260 GOTO 240 270 FORJ4=1TO12:PRINT:NEXTJ4 280 INPUT"INSERTIONS";A3$ 290 IF A3$="Y" THEN 770 300 INPUT"DELETIONS";A3$ 310 IF A3$="Y" THEN 910 320 &"TO EDIT A LINE, TYPE IN THE LINE #" 330 &"TO FINISH, TYPE '0'." 340 INPUT"##";I2 350 IF I2=0 THEN 450 360 IF I2<0 OR I2>128 THEN 440 370 PRINTA$(I2) 380 INPUT"CHANGE";A4$ 390 IF A4$="Y" THEN 400 ELSE 340 400 PRINT"GO AHEAD" 410 INPUT A5$ 420 A$(I2)=A5$ 430 GO TO 340 440 &"NOT A LEGAL NUMBER - TRY AGAIN": GOTO 340 450 &:& 460 INPUT"DO YOU WANT A LISTING";A6$ 470 IF A6$="Y"THEN 480 ELSE 730 480 I=1 490 P=1 500 S=1 510 PRINT FOR K=1 TO 9 520 PRINT"CASANOVA INSTRUCTION FILE",A1$,DATE$(0),"PAGE";P 530 PRINT:PRINT 540 PRINT 550 IF S=1 THEN PRINT,"STEP";S 560 L=1 570 IF L=42 THEN 650 580 PRINT I;A$(I) 590 IF A$(I)="HALT" THEN 690 600 IF A$(I)="HALT123456789" THEN 720 610 L=L+1 620 I=I+1 630 GOTO 570 640 PRINT:PRINT 650 PRINT FOR L=1 TO 12 660 P=P+1 670 GOTO 520 680 IF A$(I)="HALT123456789" THEN 720 690 S=S+1 700 PRINT,"STEP";S 710 GOTO 610 720 PRINT FOR K=L TO 64 730 PRINT"FILE ";A1$;" IS CLOSED." 740 PRINT"THIS ENDS INSTLG." 750 CLOSE 1 760 GOTO 1030 770 FOR I=1 TO 200 780 IF A$(I)="HALT123456789" THEN 800 790 NEXT I 800 L1=I 810 INPUT"INSERTION BEFORE LINE#";L 820 &"GO AHEAD" 830 INPUT A2$ 840 FOR I=L1 TO L STEP -1 850 A$(I+1)=A$(I) 860 NEXT I 870 A$(L)=A2$ 880 INPUT"ANOTHER INSERTION";A3$ 890 IF A3$="N" THEN 300 900 L1=L1+1:GOTO 810 910 INPUT"DELETE WHICH LINE#";L 920 FOR I=1 TO 128 930 IF A$(I)="HALT123456789" THEN 950 940 NEXT I 950 L1=I 960 FOR I=L TO L1 970 A$(I)=A$(I+1) 980 NEXT I 990 INPUT"ANOTHER DELETION";A3$ 1000 IF A3$="Y" THEN 910 ELSE 320 1010 PRINT"THERE HAS BEEN AN ERROR. RERUN THIS PROGRAM.":GOTO 730 1020 PRINT"USE THE PROGRAM INSTSM." 1030 END