(* Include **********************************************************) (* System User Entry, v. 0550pm, thu, 18.Sep.86, Glen Ellis *) (* need to parse user entry for correctness *) (* included with the Core Program SYSTEM.PAS, (* as an auxillary module to be modified for each future application. (* (* purpose: (* accept user data as if from commandline. (* operates for single source file. (* if no filename entry, then flags for documentation (* (* function: (* fetches infile, indent#, Comment, LineCnt, Vertiate (* from user keyboard (* supplies defaults for indent#, Comment, LineCnt (* *) (*---------------------------------------------------------------*) begin (* proc *) (*---> Header *) pClearScreen; (* SysScr.inc *) gotoxy(00,05); writeln('-------------------------'); writeln('System User Input Module '); (*---> #1 parameter *) IF SysCmdUserFile then (* fetch it *) begin SysInFileName := ' '; REPEAT (* force valid user entry *) gotoxy(00,08); writeln('Enter "?" for Documentation screens'); write('Enter Source FileName : '); readln(SysInfileName); UNTIL SysInFileName > ' ' ; IF (SysInFileName = '?') then begin SysCmdUser := false; SysInFileName := 'Documentation'; (* always for single file mode *) end; (* developmental *) (* if file entry allows user defaults, then alter this *) (* IF SysInSourceMax = 0 then *) (* Single file mode defaults *) SysInSource[1] := SysInFilename; SysInSourceCnt := 0; SysInSourceMax := 1; (* only for compatibility *) (* else file entry pushed sysinsourcemax up *) end; (* if not *) (*----------------------------*) IF (SysCmdUser) and (SysCmdUserParm) then begin (* SysCmdUser *) (*---> # 2 parameter *) (* Indent *) SysIndentNum := 0; Repeat gotoxy(00,10); write('Enter IndentNum : '); readln(SysIndentNum); Until (SysIndentNum > 0) and (SysIndentNum < 81); SysIndent := true; SysIndentPos := 0; (*---> #3 parameter *) (* Comment *) gotoxy(00,12); write('Comment Lines Included ? '); readln(SysCharEntry); SysComment := true ; (* default *) IF (length(SysCharEntry) > 0) then IF (upcase(SysCharEntry) = 'N') then SysComment := false; (*---> #4 parameter *) (* LineCnt *) gotoxy(00,14); write('Enter LineCnt mode ? '); readln(SysCharEntry); SysLineCnt := false; (* default *) SysLenMax := 79; IF (length(SysCharEntry) > 0) then IF (upcase(SysCharEntry) = 'Y') then begin SysLineCnt := true; SysLenMax := 75; end; (*---> #5 parameter *) (* Vertiate *) gotoxy(00,16); write('Enter Vertiate mode ? '); readln(SysCharEntry); SysVertiate := false; (* default *) IF (length(SysCharEntry) > 0) then IF (upcase(SysCharEntry) = 'Y') then SysVertiate := true; (*---> #6 paramter *) (* Tracer *) gotoxy(00,18); write('System Programmer Tracer Flag (Y/N) ? '); readln(SysCharEntry); SysPgmTrace := false; (* default *) IF (length(SysCharEntry) > 0) then IF (upcase(SysCharEntry) = 'Y') then SysPgmTrace := true; end; (* SysCmdUser *) end; (* proc *) (*---------------------------------------------------------*) (*:B:0*) (*:B:0*)