[DUG] Count

Jeremy Coulter vss at vss.co.nz
Thu Jan 24 14:04:41 NZDT 2008


SORT of along these lines, the other day I was altering a function in a 
Kylix app that i have written.
Well, I am using CrossKylix, but I think this is still usign the Kylix 
compiler.

Anyway, I was going :-

var
iVersion : double;
begin
if iVersion >= 1.4 then
blah
else
blah blah;
end;
Ok, thats fine, EXCEPT  "iVersion >=1.4"  was never true when iVersion was 
1.5 !!
In the end, I had to define another variable which was also a double (single 
and real had no affect either) then assigne 1.4 ti the new variable, THEN 
when I did iVersion >= iNewVar it worked.
Thats GOT to be a compiler issue. It def. compiles in the code example 
above, it just didnt evaluate properly....weired....and quite frustrating !

Jeremy


-----Original Message-----

From: Nick <nick at salehoo.com>

To: NZ Borland Developers Group - Delphi List <delphi at listserver.123.net.nz>

Date: Thu, 24 Jan 2008 13:30:09 +1300

Subject: Re: [DUG] Count




If (x = 0) and (y=1) then



?





Bob Pawley wrote:

> Hi

>

> I have two variables x and y that are sums of column rows.

>

> I am attempting to drive a command depending on the number returned be 

> each variable. For instance:

>

>    if x = 0 then if y = 1 then ;

>     CurrDeviceSelection :=  CurrOptionList.items[0];

>

> Delphi doesn't like a " if x=0 and y=0 then" at deign time but it also 

> doesn't like the above any better at run time.

>

> Is there a better expression that I can use to compare two variables???

>

> Bob

> _______________________________________________

> NZ Borland Developers Group - Delphi mailing list

> Post: delphi at listserver.123.net.nz

> Admin: http://delphi.org.nz/mailman/listinfo/delphi 
[http://delphi.org.nz/mailman/listinfo/delphi]

> Unsubscribe: send an email to delphi-request at listserver.123.net.nz 

> with Subject: unsubscribe

>

>

_______________________________________________

NZ Borland Developers Group - Delphi mailing list

Post: delphi at listserver.123.net.nz

Admin: http://delphi.org.nz/mailman/listinfo/delphi 
[http://delphi.org.nz/mailman/listinfo/delphi]

Unsubscribe: send an email to delphi-request at listserver.123.net.nz with 
Subject: unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20080124/c611ac87/attachment.html


More information about the Delphi mailing list