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

Home » Public Forums » archive » Help requested in eradicating FOR loops
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: Help requested in eradicating FOR loops [message #57646 is a reply to message #57539] Wed, 19 December 2007 19:02 Go to previous messageGo to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
Kenneth Bowman wrote:
> In article <fkbg7s$vbl$1@news.ucalgary.ca>,
> Jean H <jghasban@DELTHIS.ucalgary.ANDTHIS.ca> wrote:
>
>>>> y_locations = fix(temp) / 4
>>> I have found that this works a bit better:
>>> y_locations = FLOOR(temp / 4)
>> It is exactly the same thing.... since fix() simply removes the
>> decimals (if used with no TYPE keyword), it acts like floor!
>>
>> Jean
>
> Be careful, FLOOR and FIX (or LONG) are not the same thing.
>
> IDL> print, floor(3.5)
> 3
> IDL> print, long(3.5)
> 3
> IDL> print, floor(-3.5)
> -4
> IDL> print, long(-3.5)
> -3
>
>
> Cheers, Ken Bowman

ooops... thanks for pointing that... thesis writing is bad for coding
details memory :-)

Jean
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: iTools problem
Next Topic: Starting a for loop within an if loop

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

Current Time: Sat Oct 11 08:03:18 PDT 2025

Total time taken to generate the page: 0.64130 seconds