This is my documentation of the specification 3.0
Is a form of BASE36 used for denoting positions on the screen.
Const
Offset = 36;
MegaNumbers = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
Function EncodeMegaNums(A:Longint):String;
var
M,L:Longint;
Begin
M:=A div Offset;
L:=A-(M*36);
Result:=MegaNumbers[M+1]+MegaNumbers[L+1];
End;
Function DecodeMegaNums(Ws:String):Longint;
var
L:Longint;
Begin
Result:=0;
For L:=1 to Length(Ws) do begin
If L mod 2=1 then Begin
Result:=((Pos(Ws[L],MegaNumbers)-1)*Offset);
End
Else Begin
Result:=Result+(Pos(Ws[L],MegaNumbers)-1);
End;
end;
End;
var
Loop:Longint;
S:String;
Begin
S:='05043M2R';
Loop:=0;
While Loop<Length(S) do begin
Writeln(DecodeMegaNums(Copy(S,Loop+1,2)));
Inc(Loop,2);
End;
Writeln(EncodeMegaNums(35));
Writeln(EncodeMegaNums(71));
End;
Modern Pascal Script, tested and works perfectly…
Recently, the UNISYS patent on the LZW technology expired, worldwide. Consequently, it is no longer necessary to request additional licensing from UNISYS.