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

Home » Public Forums » archive » bug in var_to_dt
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
bug in var_to_dt [message #12093] Fri, 26 June 1998 00:00 Go to previous message
wmc is currently offline  wmc
Messages: 117
Registered: February 1995
Senior Member
There is a bug in var_to_dt (idl 5.1).

Try this:
a=var_to_dt(1980) ; Fine
a=var_to_dt([1980]) ; Fails
a=var_to_dt([1980,1981]) ; Fine

Why? Because var_to_dt "cleverly" looks to see if its input has more than one
element - if so it recursively calls itself with the individual elements. But
if it is given a one-element array as input it then uncleverly fails. The fix
is to patch the code to look at (size(yyyy))(0) to see if it is an array, I think.

- William

---
William M Connolley | wmc@bas.ac.uk | http://www.nbs.ac.uk/public/icd/wmc/
Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Q: write to clipboard
Next Topic: Re: plotting on a draw widget

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

Current Time: Sat Oct 11 08:41:44 PDT 2025

Total time taken to generate the page: 0.64016 seconds