comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Commutativity of multiplication
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Commutativity of multiplication [message #50986 is a reply to message #50983] Wed, 25 October 2006 13:42 Go to previous messageGo to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <ehoh6g$asc$1@naig.caltech.edu>, Sven Geier <sZgeier@calteZch.edZu>
wrote:

> There's something odd afoot with ULong variables (in 6.3) that isn't clear
> to me:
>
> IDL> help,f,g,h
> F LONG = 500
> G ULONG = 1
> H FLOAT = 1.00000
> IDL> help,f*h,h*f
> <Expression> FLOAT = 500.000
> <Expression> FLOAT = 500.000
> IDL> help,f*g,g*f
> <Expression> LONG = 500
> <Expression> ULONG = 500
>
>
> Is this a bug? A feature? Well-known gotcha? Obscure property? Recently
> added functionality? Vestigial peculiarity?
>
>
> - S

A little poking around in the docs revealed this:

Note : Signed and unsigned integers of a given width have the same precedence.
In an expression involving a combination of such types, the result is given the
type of the *leftmost* operand. (Emphasis in original.)

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Syntax errors
Next Topic: Re: !P.SYMSIZE still broken? after 5 years?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 23:21:30 PDT 2025

Total time taken to generate the page: 0.56108 seconds