Because the following line will exit from the function without returning any values.
if (Prompt = '') and (CheckBox = '') then exit; ----- Original Message ----- From: "Alistair George" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 31, 2004 9:28 PM Subject: [DUG] Weird Delphi Warning > 'Return value of function might be undefined' > Surely: Result := ''; defines a return value?? > > function EditBox(Prompt, Caption, Default, PassChar, CheckBox, Sound: string; > Pic: Tpicture; > BoxColor, EditColor: Tcolor; Position: Tposition; StayOnTop: Boolean; > EditFont, CheckBoxFont: Tfont; EditWidth: Integer): string; > var form: Tform; > ww, Ttop, i: Integer; > p: array[0..255] of char; > hList, el, dl, cb: TstringList; > begin > Result := ''; //if this lines removed the warning goes away?????????? > if (Prompt = '') and (CheckBox = '') then exit; > > _______________________________________________ > Delphi mailing list > [EMAIL PROTECTED] > http://ns3.123.co.nz/mailman/listinfo/delphi > _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
