----- Original Message -----
From: "Vincent Snijders" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, March 15, 2007 19:07
Subject: Re: [lazarus] Illegal Expression -- Exit
> Jeff Steinkamp schreef:
>> Anyone know why I might be getting an Illegal Expression on a line
>> containing
>> the keyword Exit?
>>
>> Might there be another way to exit a procedure in the middle of the
>> procedure
>> beside using the keyword jump?
>
> Can you post a snippet of code?
>
> Vincent
This is almost word for word from a Delphi project that performs the same
function. I can replace the Exit with a goto LABEL and place the LABEL at the
exit point and it does the same thing, but I really like to stay away from
goto's!!! Too many nightmares from my days of assembly language and I am
chasing
one of these at work right now.
Compiler fails at the Exit keyword.
procedure TForm1.SaveAsExecute(Sender: TObject);
begin
savedialog1.InitialDir := HomeDirectory;
if SaveDialog1.Execute then
begin
fLogFileName := Savedialog1.FileName;
if FileExists(fLogFilename) then
if MessageDlg('File Exists, Overwrite this
file?',mtWarning,[mbYes,mbNo],0) = mrNO then Exit;
StringGridSaveToFile(loggrid,flogfilename);
fLogHasChanged := false;
caption := 'Ten-Ten Logging System - ' + flogfilename;
end;
end;
Jeff Steinkamp - N7YG
Tucson, AZ
SCUD Missile Coordinates
N32-13-55.01 W110-50-51.91
http://n7yg.net
http://home.earthlink.net/~jksteinkamp
Linux User #420428
Skype : jeff.steinkamp
_______________________________________________________
DOS never says 'EXCELLENT command or filename'...
____________________________________________________________________________________
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives