home *** CD-ROM | disk | FTP | other *** search
- (*****************************************************************************)
- (* *)
- (* _SFORM.PAS is a Turbo 4.0 unit to mimic the form function of Turbo 3.x. *)
- (* The underline in the name is a convention I've started to separate my unit*)
- (* files from everything else. *)
- (* *)
- (* _SFORM follows the string formating conventions of 3.0. *)
- (* *)
- (* function FormStr(Picture : string; *)
- (* S : string) : string; *)
- (* *)
- (* Where a Picture can be a string such as: *)
- (* *)
- (* 'This is a picture left Justified ######## ' *)
- (* 'This is a picture right Justified @######## ' *)
- (* *)
- (*****************************************************************************)
-
- program _SFORM_DEMO;
-
- uses crt,_SFORM;
-
- const
- S1 = 'SHORT STRING';
- S2 = 'A Longer String to demonstrate string clipping.';
-
- var C :char;
-
- begin
- clrscr;
- writeln( 'The form field with ''#'' signs only ###############');
- writeln(FormStr('This demonstrates a left justified field ###############',S1));
- writeln;
- writeln( 'The form field with ''@'' sign @##############');
- writeln(FormStr('This demonstrates a right justified field @##############',S1));
- writeln;
- writeln(S2);
- writeln(FormStr('This demonstrates string clipping ###############',S2));
- write('Press any key . . .');
- C:=ReadKey;
- end.