home *** CD-ROM | disk | FTP | other *** search
- Uses Tbase , DbStr;
-
- (* This is the Simplest program I used to format the Manual Tbase3.Txt.
- I just include this to you to show as another demo of what Tbase3
- can do with Pascal. See Demo.pas for a comprehensive demo *)
-
- Var i : LongInt ;
- Manual : DataObject ;
- Mfile : Text ;
-
- (*
- This routine writes the specifies field s if it is not empty.
- sss and ss are just strings for allighment or heading.
- *)
-
- Procedure WriteData(sss,ss,s : string ) ;
- Begin
- s := Trim ( Manual^.FieldData(s) ) ;
- If s <> '' then Begin
- if Trim(sss) <> '' then Writeln(Mfile, sss );
- Writeln(Mfile , ss + s );
- End;
- End;
-
- (* This procedure displays the fields in a formatted manner.
- Notice that Field names are given with no discremination of case
- or spaces *)
-
- Procedure WriteManual;
- Var j : Integer ;
- Begin
- WriteData('','','Name'); Writeln(Mfile);
- WriteData('Description',' ','Discript1') ;
- WriteData(' ',' ','Discript2') ; Writeln(Mfile);
- WriteData('Syntax ',' ','use1 ') ;
- WriteData(' ',' ','use2 ') ; Writeln(Mfile);
- WriteData('Remarks ',' ','remark1 ') ;
- WriteData(' ',' ','remark2 ') ;
- WriteData(' ',' ','remark3 ') ; Writeln(Mfile);
- WriteData('Warning ',' ','warning1 ') ;
- WriteData(' ',' ','warning2 ') ; Writeln(Mfile);
- WriteData('See Also ',' ','seeALSO ') ;
- Writeln(Mfile , '----------------------------------------------------------');
- Writeln(Mfile);
- End;
-
- Begin { M a i n }
-
- Assign( Mfile , Paramstr(2) );
- Rewrite(Mfile);
-
- New( Manual , Init( paramstr(1) ) );
-
- With Manual^ do
- Begin
- For i := 1 to RecCount do
- Begin
- GetDbRec(i);
- WriteManual;
- End;
- End;
- Dispose( Manual , done );
-
- Close(Mfile);
- End.
-