Ok, I've been arguing over that with a friend of mine for a couple of
e-mail's now... I need your help!
Let me show an example first:
type TFoo = class end;
var Foo : TFoo;
The question is, wether this is valid:
if (Foo <> nil) and (Foo.inheritsFrom(TFoo)) then do_something;
I would have no
Kornel Kisielewicz wrote:
Ok, I've been arguing over that with a friend of mine for a couple of
e-mail's now... I need your help!
Let me show an example first:
type TFoo = class end;
var Foo : TFoo;
The question is, wether this is valid:
if (Foo <> nil) and (Foo.inheritsFrom(TFoo)) then do_
Michalis Kamburelis wrote:
Can I make the assumption that boolean expressions are GUARANTEED to
be evaluated left-to-right?
>
> Yes.
Thanks, I guess I lost the argument :]. Anyway, I guess it wouldn't hurt
to clarify that just a little bit in the manual :-/
--
At your service,
Kornel Kisielew
> Thanks, I guess I lost the argument :]. Anyway, I guess it wouldn't hurt
> to clarify that just a little bit in the manual :-/
However, IIRC "complete boolean eval" (which is what delphi calls it) would
blow the code up, as even if Foo was nil, the second half would be evaluated
regardless.
May
On Tue, 22 Nov 2005, Kornel Kisielewicz wrote:
Michalis Kamburelis wrote:
Can I make the assumption that boolean expressions are GUARANTEED to be
evaluated left-to-right?
Yes.
Thanks, I guess I lost the argument :]. Anyway, I guess it wouldn't hurt to
clarify that just a little bit in th
At 14:04 20-11-2005, you wrote:
Florian Klaempfl wrote:
Lukas Gebauer wrote:
enhancements in Delphi-2006... (like operator overloads or class
variables...)
... which has fpc for years :)
I didn't know that. How do I declare a class variable in fpc?
like this?
type
MyClass = class(TCompon
Peter Vreman wrote:
At 14:04 20-11-2005, you wrote:
Florian Klaempfl wrote:
Lukas Gebauer wrote:
enhancements in Delphi-2006... (like operator overloads or class
variables...)
... which has fpc for years :)
I didn't know that. How do I declare a class variable in fpc?
like this?
type