home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / RFORM.ZIP / _SFORM.DOC < prev    next >
Encoding:
Text File  |  1988-01-06  |  2.0 KB  |  42 lines

  1. (*****************************************************************************)
  2. (*                                                                           *)
  3. (* _SFORM.PAS is a Turbo 4.0 unit to mimic the form function of Turbo 3.x.   *)
  4. (* The underline in the name is a convention I've started to separate my unit*)
  5. (* files from everything else.                                               *)
  6. (*                                                                           *)
  7. (* _SFORM follows the string formating conventions of 3.0.                   *)
  8. (*                                                                           *)
  9. (* function FormStr(Picture : string;                                        *)
  10. (*                  S       : string) : string;                              *)
  11. (*                                                                           *)
  12. (* Where a Picture can be a string such as:                                  *)
  13. (*                                                                           *)
  14. (* 'This is a picture left Justified ######## '                              *)
  15. (* 'This is a picture right Justified @######## '                            *)
  16. (*                                                                           *)
  17. (*****************************************************************************)
  18.  
  19. program _SFORM_DEMO;
  20.  
  21. uses crt,_SFORM;
  22.  
  23. const
  24.   S1 = 'SHORT STRING';
  25.   S2 = 'A Longer String to demonstrate string clipping.';
  26.  
  27. var C :char;
  28.  
  29. begin
  30.   clrscr;
  31.   writeln(        'The form field with ''#'' signs only        ###############');
  32.   writeln(FormStr('This demonstrates a  left justified field ###############',S1));
  33.   writeln;
  34.   writeln(        'The form field with ''@'' sign              @##############');
  35.   writeln(FormStr('This demonstrates a right justified field @##############',S1));
  36.   writeln;
  37.   writeln(S2);
  38.   writeln(FormStr('This demonstrates string clipping         ###############',S2));
  39.   write('Press any key . . .');
  40.   C:=ReadKey;
  41. end.
  42.