Il 14/08/2018 12:37, Martok ha scritto:
label label0,label1,label2,{...,}afterend;
const table: array [lowestcaselabel..highestcaselabel] of CodePointer =
(@label0, @label1, @label2{,...});
if (x<lowestcaselabel) or (x>highestcaselabel) then
goto @afterend;
goto table[x];
label0:
code;
goto afterend;
label1:
Morecode;
goto afterend;
label2:
EvenMoreCode;
{...}
afterend:
I did not aware about CodePointer type and its use in conjunction with
the goto, it is very useful, thank you.
But for compatibility with TP, I could need for a plain branch table, I
am writing a new mail in the other list...
Marco
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel