[fpc-pascal] how to make this tp7 code work on fpc

Travis Siegel tsiegel at softcon.com
Sat Jun 27 19:34:43 CEST 2020


On 6/27/2020 5:34 AM, Zamrony P. Juhara via fpc-pascal wrote:
> Use {$MODE TP}
>
> Zamrony P. Juhara



Hadn't known about that particular directive, but it changes nothing.  
Using -Mtp also changes nothing.

Still get illegal expression errors. <frown> Anyone know how to convert 
this to something FPC can parse? I tried looking up hash tables in the 
help files, but the brief summaries there don't shed enough light on the 
syntax for me to figure out how to convert this mess to something FPC 
can handle.


> On Sat, Jun 27, 2020 at 14:27, Travis Siegel
>
>     <tsiegel at softcon.com> wrote:
>     I'm porting some code from tp7 to fpc, and I'm running into an
>     error I
>     don't know how to fix.  The comments claim it's supposed to be a hash
>     table, but to me, it looks more like labels tied to various arrays.
>
>
>       Ofs_00_02: Word = Ofs (Ofs_00_01);
>       Tok_00_02: TToken = Token_BEGIN;
>       ResWordLen_BEGIN: Byte = 5;
>       ResWord_BEGIN: Array [1..5] of Char = 'BEGIN';
>
>       Ofs_00_03: Word = Ofs (Ofs_00_02);
>       Tok_00_03: TToken = Token_DIV;
>       ResWordLen_DIV: Byte = 3;
>       ResWord_DIV: Array [1..3] of Char = 'DIV';
>
>       Ofs_00_04: Word = Ofs (Ofs_00_03);
>       Tok_00_04: TToken = Token_NIL;
>       ResWordLen_NIL: Byte = 3;
>       ResWord_NIL: Array [1..3] of Char = 'NIL';
>
>       Ofs_00_05: Word = Ofs (Ofs_00_04);
>       Tok_00_05: TToken = Token_PROCEDURE;
>       ResWordLen_PROCEDURE: Byte = 9;
>       ResWord_PROCEDURE: Array [1..9] of Char = 'PROCEDURE';
>
>     Fpc just gives me illegal expression errors, with no indication as to
>     what's illegal about them.  Any suggestions?
>
>     Thanks for any help in advance.
>
>     _______________________________________________
>     fpc-pascal maillist  - fpc-pascal at lists.freepascal.org
>     <mailto:fpc-pascal at lists.freepascal.org>
>     https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20200627/0593fdda/attachment.htm>


More information about the fpc-pascal mailing list