Hi, I get this error :
./src/test.p: In main program: ./src/test.p:11: label `goal' used before containing binding contour
------------------------------------------------------------
program t;
label goal; var s: string(80);
begin if s <>'' then goto goal; s:=trim(s); goto goal;
goal: end.
-------------------------------------------------------------- I suspect trim routine to be the cause. If I remove trim call, my program compile right.
Thanks
I get this error :
./src/test.p: In main program: ./src/test.p:11: label `goal' used before containing binding contour
program t;
label goal; var s: string(80);
begin if s <>'' then goto goal; s:=trim(s); goto goal;
goal: end.
I suspect trim routine to be the cause. If I remove trim call, my program compile right.
The problem is with `goto'. See to-do list:
@item problem with string operations and @samp{goto} (contourbug.pas, martin1.pas, berend3.pas)
The problem might be difficult to fix, that's why we haven't done so. The work-around, of course, is to not use `goto' (which is recommended, anyway).
Frank
On Thu, Sep 11, 2003 at 10:49:38PM +0200, Frank Heckenbach wrote:
I get this error :
./src/test.p: In main program: ./src/test.p:11: label `goal' used before containing binding contour
program t;
label goal; var s: string(80);
begin if s <>'' then goto goal; s:=trim(s); goto goal;
goal: end.
I suspect trim routine to be the cause. If I remove trim call, my program compile right.
The problem is with `goto'. See to-do list:
@item problem with string operations and @samp{goto} (contourbug.pas, martin1.pas, berend3.pas)
The problem might be difficult to fix, that's why we haven't done so. The work-around, of course, is to not use `goto' (which is recommended, anyway).
... or to move the goto target in _front_ of the offending string routines, if that suits your application.
program t;
label goal; var s: string(80);
begin if false then begin goal: halt end; if s <>'' then goto goal; s:=trim(s); goto goal; end.
Emil