Re: IDL refuse to acknowledge anything but integers... [message #79717] |
Tue, 27 March 2012 08:26  |
Lajos Foldy
Messages: 176 Registered: December 2011
|
Senior Member |
|
|
On Tuesday, March 27, 2012 4:51:03 PM UTC+2, Julien wrote:
> Hello everyone.
>
> I encountered the weirdest bug I ever saw with IDL. I can't say
> exactly when it happened, but at some point a few hours ago, IDL
> stopped taking into account anything below one. Example:
>
> IDL> print,float(0.25)
> 0,00000
> IDL> print,0.25
> 0,00000
> IDL> print,-0.12
> -0,00000
> IDL> print,1.2
> 1,00000
> IDL> print,1.2d
> 1,0000000
>
> Please help, I'm going mad...
The output suggests that you have a decimal comma instead of a decimal dot. Try 'print, 1,23'
regards,
Lajos
|
|
|
Re: IDL refuse to acknowledge anything but integers... [message #79719 is a reply to message #79717] |
Tue, 27 March 2012 08:07   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Julien writes:
> I encountered the weirdest bug I ever saw with IDL. I can't say
> exactly when it happened, but at some point a few hours ago, IDL
> stopped taking into account anything below one. Example:
>
> IDL> print,float(0.25)
> 0,00000
> IDL> print,0.25
> 0,00000
> IDL> print,-0.12
> -0,00000
> IDL> print,1.2
> 1,00000
> IDL> print,1.2d
> 1,0000000
>
> Please help, I'm going mad..
I'm pretty sure IDL was trying to follow the matrix
multiplication thread from the past couple of days.
This is *exactly* what happens!
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: IDL refuse to acknowledge anything but integers... [message #86543 is a reply to message #79717] |
Mon, 18 November 2013 07:07   |
sara.magrin
Messages: 3 Registered: November 2013
|
Junior Member |
|
|
Hi all,
I have the same problem.
I quit IDLDE and tried again.
Both with IDLDE and command line I find everything correct at the beginning:
IDL> PRINT,FLOAT('2.41e12'),' 2.41e12'
2.41000e+012 2.41e12
but after the dialog_pickfile() it changes from floating-point to "floating-comma"
IDL> files=DIALOG_PICKFILE()
IDL> PRINT,FLOAT('2.43e12'),' 2.43e12'
2,00000 2.43e12
How can I fix it?
Is there a system variable to set for the floating-POINT?
Anyway no problem if I call DIALOG_PICKFILE(/directory), instead.
regards,
Sara
How can I fix it?
Il giorno martedì 27 marzo 2012 17:26:54 UTC+2, fawltyl...@gmail.com ha scritto:
> On Tuesday, March 27, 2012 4:51:03 PM UTC+2, Julien wrote:
>
>> Hello everyone.
>
>>
>
>> I encountered the weirdest bug I ever saw with IDL. I can't say
>
>> exactly when it happened, but at some point a few hours ago, IDL
>
>> stopped taking into account anything below one. Example:
>
>>
>
>> IDL> print,float(0.25)
>
>> 0,00000
>
>> IDL> print,0.25
>
>> 0,00000
>
>> IDL> print,-0.12
>
>> -0,00000
>
>> IDL> print,1.2
>
>> 1,00000
>
>> IDL> print,1.2d
>
>> 1,0000000
>
>>
>
>> Please help, I'm going mad...
>
>
>
> The output suggests that you have a decimal comma instead of a decimal dot. Try 'print, 1,23'
>
>
>
> regards,
>
> Lajos
|
|
|
Re: IDL refuse to acknowledge anything but integers... [message #86544 is a reply to message #86543] |
Mon, 18 November 2013 07:16   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
sara.magrin@gmail.com writes:
>
> Hi all,
> I have the same problem.
>
> I quit IDLDE and tried again.
> Both with IDLDE and command line I find everything correct at the beginning:
>
> IDL> PRINT,FLOAT('2.41e12'),' 2.41e12'
> 2.41000e+012 2.41e12
>
> but after the dialog_pickfile() it changes from floating-point to "floating-comma"
>
> IDL> files=DIALOG_PICKFILE()
> IDL> PRINT,FLOAT('2.43e12'),' 2.43e12'
> 2,00000 2.43e12
>
> How can I fix it?
> Is there a system variable to set for the floating-POINT?
>
> Anyway no problem if I call DIALOG_PICKFILE(/directory), instead.
Weird. Somehow a different language pack must be getting set. Does this
article give you any ideas?
http://www.idlcoyote.com/workbench/languages.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
Re: IDL refuse to acknowledge anything but integers... [message #86545 is a reply to message #86544] |
Mon, 18 November 2013 07:48   |
sara.magrin
Messages: 3 Registered: November 2013
|
Junior Member |
|
|
Dear David,
no way, but thanks.
The problem is that it changes the language (or whatever) in the middle of a script.
After dialog_pickfile(), it seems. Or at least this is the first line where I find this problem in one of my old scripts (they obviously all worked well till some months ago, with the very same pc, with the very same idl version).
Even if I could start IDL in a given language (and I cannot: the "-nl en" after the shortcut target gives me an error) maybe I would prefer to be able to reset to the default language inside a script.
Anyway, tomorrow I will try to re-install IDL and see.
Maybe it is only a problem with the "java world" of eclipse..
If I find something useful I'll let you know.
Thanks again,
Sara
Il giorno lunedì 18 novembre 2013 16:16:42 UTC+1, David Fanning ha scritto:
> sara.magrin@gmail.com writes:
>
>
>
>>
>
>> Hi all,
>
>> I have the same problem.
>
>>
>
>> I quit IDLDE and tried again.
>
>> Both with IDLDE and command line I find everything correct at the beginning:
>
>>
>
>> IDL> PRINT,FLOAT('2.41e12'),' 2.41e12'
>
>> 2.41000e+012 2.41e12
>
>>
>
>> but after the dialog_pickfile() it changes from floating-point to "floating-comma"
>
>>
>
>> IDL> files=DIALOG_PICKFILE()
>
>> IDL> PRINT,FLOAT('2.43e12'),' 2.43e12'
>
>> 2,00000 2.43e12
>
>>
>
>> How can I fix it?
>
>> Is there a system variable to set for the floating-POINT?
>
>>
>
>> Anyway no problem if I call DIALOG_PICKFILE(/directory), instead.
>
>
>
> Weird. Somehow a different language pack must be getting set. Does this
>
> article give you any ideas?
>
>
>
> http://www.idlcoyote.com/workbench/languages.html
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
Re: IDL refuse to acknowledge anything but integers... [message #86556 is a reply to message #86545] |
Tue, 19 November 2013 05:26  |
sara.magrin
Messages: 3 Registered: November 2013
|
Junior Member |
|
|
Dear all,
I reinstalled idl in both version available at my dept. at University: 7.1 and 8.2
with 7.1 again the same problem I wrote you yesterday (I had 7.1 till yesterday).
with 8.2 no problem.
I live in Italy so by default we have "european" decimal comma instead of a point.
By changing this small little option on my settings on windows control panel everything works prefectly, now, with both versions.
Now my old procedures work well, as they did some months ago.
It seems that this dialog_pickfile() function request an external "something" (from java or from the operative system?) that gives back to idl even my windows language settings.
This means also that all my applications and softwares NOW work with the decimal-point instead of the decimal-comma (excel for example), but this is ok for me.
This change also helped one of my colleagues that some week ago found that "wset" was not working anymore on her idl (again 7.1).
Now everything works also for her.
hoping to be useful...
Sara
Il giorno lunedì 18 novembre 2013 16:48:44 UTC+1, sara....@gmail.com ha scritto:
> Dear David,
>
>
>
> no way, but thanks.
>
> The problem is that it changes the language (or whatever) in the middle of a script.
>
> After dialog_pickfile(), it seems. Or at least this is the first line where I find this problem in one of my old scripts (they obviously all worked well till some months ago, with the very same pc, with the very same idl version).
>
>
>
> Even if I could start IDL in a given language (and I cannot: the "-nl en" after the shortcut target gives me an error) maybe I would prefer to be able to reset to the default language inside a script.
>
>
>
> Anyway, tomorrow I will try to re-install IDL and see.
>
> Maybe it is only a problem with the "java world" of eclipse..
>
> If I find something useful I'll let you know.
>
>
>
> Thanks again,
>
> Sara
>
>
>
>
>
> Il giorno lunedì 18 novembre 2013 16:16:42 UTC+1, David Fanning ha scritto:
>
>> sara.magrin@gmail.com writes:
>
>>
>
>>
>
>>
>
>>>
>
>>
>
>>> Hi all,
>
>>
>
>>> I have the same problem.
>
>>
>
>>>
>
>>
>
>>> I quit IDLDE and tried again.
>
>>
>
>>> Both with IDLDE and command line I find everything correct at the beginning:
>
>>
>
>>>
>
>>
>
>>> IDL> PRINT,FLOAT('2.41e12'),' 2.41e12'
>
>>
>
>>> 2.41000e+012 2.41e12
>
>>
>
>>>
>
>>
>
>>> but after the dialog_pickfile() it changes from floating-point to "floating-comma"
>
>>
>
>>>
>
>>
>
>>> IDL> files=DIALOG_PICKFILE()
>
>>
>
>>> IDL> PRINT,FLOAT('2.43e12'),' 2.43e12'
>
>>
>
>>> 2,00000 2.43e12
>
>>
>
>>>
>
>>
>
>>> How can I fix it?
>
>>
>
>>> Is there a system variable to set for the floating-POINT?
>
>>
>
>>>
>
>>
>
>>> Anyway no problem if I call DIALOG_PICKFILE(/directory), instead.
>
>>
>
>>
>
>>
>
>> Weird. Somehow a different language pack must be getting set. Does this
>
>>
>
>> article give you any ideas?
>
>>
>
>>
>
>>
>
>> http://www.idlcoyote.com/workbench/languages.html
>
>>
>
>>
>
>>
>
>> Cheers,
>
>>
>
>>
>
>>
>
>> David
>
>>
>
>> --
>
>>
>
>> David Fanning, Ph.D.
>
>>
>
>> Fanning Software Consulting, Inc.
>
>>
>
>> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
>>
>
>> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|