home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
t
/
ter70.zip
/
PASCAL._XE
/
XLATE.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1993-01-12
|
1KB
|
47 lines
{ 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]+')');
End
Else
WriteLn('Could not open file');
End
End.