home *** CD-ROM | disk | FTP | other *** search
- { Small sample program to show how the translation files are build or if }
- { you want to make a converter from other programs }
-
- Type
-
- TranslationType = Record
- TableNote : String[54];
- InTable,
- OutTable : Array[0..255] of Char;
- Filler : Array[1..33] of Char;
- End;
-
- Var
- T : TranslationType;
- F : File of TranslationType;
-
- X : Byte;
-
- Begin
- WriteLn('Terminate translation viewer, by Bo Bendtsen 1993');
- If Paramcount<>1 Then WriteLn('Syntax: XLATE filename.xlt')
- Else Begin
- Assign(F,ParamStr(1));
- {$I-} Reset(F); {$I+}
- If IOResult=0 Then
- Begin
- Read(F,T);
- Close(F);
- WriteLn;
- WriteLn('Incoming translation:');
- For X:=0 to 255 Do
- If x<>Ord(T.InTable[x]) Then
- WriteLn(x,' ',Ord(T.InTable[x]),' ('+T.InTable[x]+')');
- WriteLn;
- WriteLn('Outgoing translation:');
- For X:=0 to 255 Do
- If x<>Ord(T.OutTable[x]) Then
- WriteLn(x,' ',Ord(T.OutTable[x]),' ('+T.OutTable[x]+')');
- WriteLn(#10'Table: '+T.TableNote);
- End
- Else
- WriteLn('Could not open file');
- End
- End.
-
-