Hi,

I'm wanting to know the precise sets of conditions under which the IV, UV, and NV flags will be set. Is this documented somewhwere ? I've tried experimenting by assigning some values and reached the following conclusions:

Iff $x is assigned an integer value between (~0 + 1) / 2 and ~0 (inclusive) then the UV flag is set.

Iff $x is assigned an integer value between -(((~0 + 1) / 2) and ~0 (inclusive) then the IV flag is set.

Iff $x > ~0 or $x < -(((~0 + 1) / 2) or $x is a non-integer number or $x is the result of a division operation then the NV flag is set.

If the number is assigned in quotes (eg $x = '12345';) then none of those flags get set until some operation that coerces the string into a number occurs - at which time the above rules come into play.

I'm not certain that I haven't overlooked something, however .... or simply got it plain wrong :-) In fact when I look back at what I've just written I can see that it's not complete.

Also what's the best way (within XS) to determine whether a scalar that has the NV flag set contains an integer value (as opposed to a value that includes a fractional component).

Cheers,
Rob

--
Any emails containing attachments will be deleted from my ISP's mail server before I even get to see them. If you wish to email me an attachment, please provide advance warning so that I can make the necessary arrangements.




Reply via email to