Andrew Gregory wrote:
if (X<-1) then begin writeln('Error X<1'); halt end;
Since I'm aiming to produce a DLL (main function in C), if X<1 I need to leave the Pascal routine immediately and return an integer failure code to my C program. How can I replace the halt statement by a jump to an exit point, with a stack clean-up?
Did you already try 'exit' instead of 'halt'? -- If this doesn't suit your needs, you could mark your exit point with a label and jump there via 'goto'.
Yours,
Markus