How about this:

Code:

for $x = 1 to 12
$year = 2000 + $x
if cdbl($year)/4 = $year/4
? "$year = LEAPYEAR"
endif
next



Point being - you got to get your your Double's happening as the very first part of the expression, in order for it to be treated (and tested) as floating point - in your example, the fractional part was being ignored.