[EMAIL PROTECTED] wrote on Tuesday, 1 June 2004 11:07 a.m.:
> I've got another one that I found funny:
> 
> ...

There's nothing particularly strange about that. The compiler tries to
determine by following the flow of execution whether or not the variable
bob will be assigned before it is read. It has no way of knowing in the
first example that bob won't be set to anything other than the three
options in the if/elseif block, and so it quite rightly generates a
warning. In the second example the initial assignment of bob will never
be used, because the if/elseif/else block guarantees it will be
assigned, and so again it generates a hint.

Cheers,
Paul

_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to