What causes "error: label `nonlocal_exit_18' not set"

lanceboyle at qwest.net lanceboyle at qwest.net
Thu Feb 23 23:15:09 CET 2006


> Waldek Hebisch wrote:
>
>>> What causes this?
>>>
>>> error: label `nonlocal_exit_18' not set
>>>
>>> It's happening right after the declaration of a procedure in a unit.
>>>
>>
>> It is a bug: what version you use and what input reproduce this  
>> message?
>
> I vaguely remember that this error message appears when Exit 
> ( procname) is used and there is another error in the source code.  
> But an example that reproduces it would be better.
>
> Regards,
>
> Adriaan van Os

[Original poster]
I sent the rather lengthy source listing that caused the problem to  
Waldek off-list along with version info and error output. He wasn't  
able to reproduce the problem, but pointed out that there was another  
error in my code. So here is a short etymology (entomology?) of the  
problem:

Source was created as FORTRAN many years ago and then converted to  
THINK Pascal.

It then compiled OK under Codewarrior 8.3 Pascal a few years ago  
(maybe with some changes).

I tried to port it to GPC a couple days ago. GPC didn't like my use  
of label and goto (FORTRAN cruft, used to to exit the program), even  
thought CW was cool with it. I felt that GPC was wrong in  
complaining, but usually it's me that's wrong. At the same time, it  
complained about nonlocal_exit_18.

I replaced the label and goto with an Exit statement--no arguments  
with Exit. At about the same time I brilliantly replaced StringOf  
with WriteStr (that's right--I tried to use WriteStr as a function,  
not a procedure). The original error about the label and goto went  
away, but I got two errors related to my botched use of WriteStr,  
followed by the remaining nonlocal_exit_18 error.

I fixed the WriteStr problem, at which time the nonlocal_exit_18  
error also disappeared.

Let me know if you want the source.

Jerry







More information about the Gpc mailing list