{$M $4000,0,0}

{* Stack memory reduced for the EXEC command *}



Program QAS2Menu;

{***************************************************************************}

{* SUB-PROGRAMS IN ORDER OF APPEARANCE

{*

{* PROCEDURE ExamineFile

{* PROCEDURE Menu

{***************************************************************************}

{*

{* GLOBAL DEFINITIONS

{*

{* USES UNIT Crt,

{* USES UNIT Croft;

{*

{***************************************************************************}

{* SUB-PROGRAMS with LOCAL DEFINITIONS and other SUB-PROGRAMS CALLED

{*

{* PROCEDURE ExamineFile

{*   local variable ExFile: string;

{* PROCEDURE Menu

{*   local variable ExFile: string;

{* PROGRAM MAIN

{*   calls PROCEDURE Menu

{*   calls PROCEDURE ExamineFile

{***************************************************************************}

{* SUB-PROGRAMS IN ALPHABETICAL ORDER

{*

{* PROCEDURE ExamineFile

{* PROCEDURE Menu

{***************************************************************************}

uses

  Crt,

  Croft;



Procedure ExamineFile;

{***************************************************************************}

var

  ExFile: string;

begin

  clr;

  ExFile := GetDirFileOnly('*.*');

  SayFile(ExFile);

end;



Procedure Menu;

{***************************************************************************}

const

  NumOpts = 5;

var

  Option: integer;

begin

  Clr;

  Say('QAS2Menu Screen (Questionnaire Analysis System)');

  Say('2Lt David Croft, 31st TES');

  Say('');

  Say('This system requires the following files:');

  Say('  QAS2MENU.EXE');

  Say('  SCAN.EXE');

  Say('  TRANS2.EXE');

  Say('  MERGE.EXE');

  Say('  REPORT2.EXE');

  writeln;

  Say('These files can be generated by QAS if not included:');

  Say('  *.IN   -- created by SCAN');

  SAY('  *.DAT  -- created by TRANS2 and MERGE');

  Say('  *.HDR  -- created by REPORT2');

  Say('  *.LTR  -- created by REPORT2');

  Say('  *.RPT  -- created by REPORT2');

  writeln;

  Say('0) Quit    -- or CONTROL-BREAK');

  Say('1) Scan    -- Communicates with the scanner to create a *.IN file.');

  Say('2) Trans2  -- Converts the raw data in the *.IN file to a *.DAT file.');

  Say('3) Merge   -- Merges the 2nd page survey sheet *.DAT to the first.');

  Say('4) Report2 -- Analyzes the *.DAT file to create a *.RPT file.');

  Say('5) Read the contents of a file');

  writeln;

  AskNum('Option', NumOpts, Option);

  case Option of

    0:  halt;

    1:  DoSubProg('Scan.Exe');

    2:  DoSubProg('Trans2.Exe');

    3:  DoSubProg('Merge.Exe');

    4:  DoSubProg('Report2.Exe');

    5:  ExamineFile;

  end; {case}

end;



{***************************************************************************}

{***************************************************************************}

{***************************************************************************}

begin

  repeat

    Menu;

  until Forever;

end.