@babyboomerboy
Maybe this is what you are trying to do?
Safe to run, it won't create or alter any files. If this is what you need, you only have to remove demo lines and get rid of the '' (double rem marks) in the code.
I recommend making a backup of your data files before adjusting your code. That way, if you are going to try writing to files, any mistakes won't destroy your saved work.
Pete
Maybe this is what you are trying to do?
Code: (Select All)
LINE INPUT "What record do you want to access 1-16? "; rnum$
IF VAL(rnum$) > 0 AND VAL(rnum$) < 17 THEN ELSE CLS: RUN ' goof proof.
GOSUB 900 ' THIS CLEARS ALL VARIABLES
REC$ = (REC$ + "RECORD " + rnum$)
'' OPEN "RECORD" + rnum$ + ".DAT" FOR INPUT AS #1
COLOR 14: PRINT "OPEN RECORD" + rnum$ + ".DAT FOR INPUT AS #1": COLOR 7 ' Demo. Remove this line for your program.
FOR TTP = 1 TO 8
FOR X = 1 TO 3
'' INPUT #1, ALINE(X, TTP)
'' INPUT #1, TIME(X, TTP)
PRINT TTP; X; " ALINE(X, TTP)" ' Demo. Remove this line for your program.
PRINT TTP; X; "TIME(X, TTP)" ' Demo. Remove this line for your program.
NEXT X
PRINT "Press a key to continue demo of next TTP.": SLEEP ' Demo. Remove this line for your program.
NEXT TTP
CLOSE #1
SELECT CASE VAL(rnum$)
CASE 1: RESULTS = 854736
CASE 2: RESULTS = 431276
CASE 3: RESULTS = 746352
CASE ELSE
' Fill in missing RESULTS values with CASE 4 through 16, here and remove CASE ELSE.
END SELECT
GOTO 360
PRINT RESULTS ' Demo. Remove this line for your program.
360
' Data breakdown
END
900
' Clear variables.
RETURN
Safe to run, it won't create or alter any files. If this is what you need, you only have to remove demo lines and get rid of the '' (double rem marks) in the code.
I recommend making a backup of your data files before adjusting your code. That way, if you are going to try writing to files, any mistakes won't destroy your saved work.
Pete