TNotifyEvent
- From: Fons Rave <fonzzz-at-xs4all-dot-nl>
- Date: Thu, 22 Jun 2006 18:31:58 +0200
var X, Y : TNotifyEvent;
begin
X := nil; { *1 }
Y := X; { *2 }
if X = nil then ; { *3 }
if X = Y then ; { *4 }
end.
The compiler doesn't accept *3 and *4. It does need a parameter ("Not
enough actual parameters") because it tries to compile to run X. How can
I do the tests in *3 and *4 ? I tried to convert to pointers but
couldn't find it.
Thanks,
Fons.
.
Relevant Pages
- Re: [Long, historical] Re: Var* b or Var *b
... I always use typedef for pointers to functions. ... But my whole point is that the _same_ declaration syntax rules are used to ... bound to 'b', not 'Var'. ... But that's not how the compiler reads it. ... (alt.comp.lang.learn.c-cpp) - Re: Are people abusing "var"?
... not using some mechanism like "var" eliminates ... This was one of the key insights in the original design of Pascal (which, despite superficial differences, is an important intellectual ancestor of C#): Let the compiler help you keep>track of what YOU think the data types and structures should be. ... So, if the reader has a problem to understand what is the real type of the object, i guess there is something very wrong either with the function, either with the reader. ... (microsoft.public.dotnet.languages.csharp) - Re: No compiler warning for uninitialized variable passed to var parameter !!!
... Test no compiler warning for uninitialized variable passed to var parameter ... version 0.01 created on 26 april 2008 by Skybuck Flying ... DoYouFeelLuckyPunkQuestionMark; // NO WARNING, BAD!!! ... So why would the compiler think that "Lucky" needs to be initialised before calling the function? ... (alt.comp.lang.borland-delphi) - Re: Conversion troubles
... function TfrmMain.StripValue(str: String): int64; ... Var tStr: String; ... The compiler gives you a hint that Resultaat is assigned but never used, ... (alt.comp.lang.borland-delphi) - Re: Lets organize our Delphi code
... the inhibitions to optimization are revealed (e.g. because of the lifetimes ... compiler will put most inner vars into CPU registers. ... calculates the scope by determining the first and last occurance of the var. ... describe with inline nested procedures is roughly the same, ... (borland.public.delphi.non-technical) |
|