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

Home » Public Forums » archive » problem with FIX function
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: problem with FIX function [message #93882 is a reply to message #93881] Tue, 15 November 2016 06:23 Go to previous messageGo to previous message
Burch is currently offline  Burch
Messages: 28
Registered: December 2013
Junior Member
On Tuesday, November 15, 2016 at 8:12:19 AM UTC-6, AGW wrote:
> Hi, all
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> IDL> x=40251.00
> IDL> print,fix(x)
> -25285
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> How it is result, what is the promplem?

By default FIX() returns an integer type, which ranges from -32768 to +32767. You need to use the TYPE keyword to specify an output type appropriate for your situation. For, instance setting "TYPE = 3" (Long integer) behaves as you would expect:

IDL> print, fix(40251.00, type = 3)
40251

IDL Documentation: http://www.harrisgeospatial.com/docs/FIX.html

-Jeff
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Divide the world into hexagons
Next Topic: Copying HDF5 datasets to a new HDF5 file

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

Current Time: Wed Oct 08 15:48:03 PDT 2025

Total time taken to generate the page: 0.00689 seconds