home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / ECO30603.ZIP / ECO30603.LZH / ECOLIBII / DEMOS / uask.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-03-21  |  1.8 KB  |  54 lines

  1. uses
  2.   eco_lib, crt
  3.  
  4.   ;
  5.  
  6.  
  7. var
  8.   error,
  9.   fore, 
  10.   back,
  11.   rs :   byte;
  12.   ww :   word;
  13.   st : string;
  14.  
  15.  
  16.  
  17. begin
  18.   __setblwin(false);
  19.   if __inparams('/?', ww) then begin
  20.     writeln(__progname, ' Version 1.1 - (C) MCMXCIII');
  21.     writeln('Written by Floor A.C. Naaijkens for UltiHouse Software.');
  22.     writeln(__rep(63, '─'));
  23.     writeln('Usage:');
  24.     writeln('  ', __progname, ' String1`sTring2_and_more_with_underscore`stRing3');
  25.     writeln('  Ends with errlev 0 if <ESC> or with errlev 1 if chosen string1');
  26.     writeln('  with errlev 2 if chosen option 2 etc..');
  27.     writeln('  Ending with errorlevel 255 when an incorrect string is presented.');
  28.     writeln('  Ending with errorlevel 254 when this help was given.');
  29.     writeln(__rep(63, '─'));
  30.     writeln(__progname, ' expects exactly one parameter, thus constructed:');
  31.     writeln('  The various parts are separated by ` quotes, and every part');
  32.     writeln('  contains exactly 1 capital. All capitals must differ.');
  33.     writeln('  Use underscores for spaces within one string.');
  34.     writeln(__rep(63, '─'));
  35.     writeln('The barmenu is commanded with:');
  36.     writeln('  Capitals, , , <SPACE>, <ENTER> and <ESC>');
  37.     writeln(__rep(63, '─'));
  38.     writeln('Option:');
  39.     writeln('  /debug  gives a debug session on your commandline.');
  40.     writeln('');
  41.     halt(254);
  42.   end;
  43.   st := ' ' + __expandchr(__xlatestr(paramstr(1), '`''', '  '), ' ', '   ') + ' ';
  44.   if __inparams('/debug', ww) then error := 255 else error := 0;
  45.   if __barcheck(st, error) then begin
  46.     __loc(wherex, wherey, fore, back);
  47.     rs := __barchoice(1, length(st)+1, wherey, fore, back, 12, st, 30);
  48.     writeln; halt(rs)
  49.   end else begin
  50.     writeln('Error in position: ', error);
  51.     halt(255);
  52.   end;
  53. end.
  54.