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

Home » Public Forums » archive » Re: Undocumented functions in IDL
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: Undocumented functions in IDL [message #83355 is a reply to message #83354] Thu, 28 February 2013 20:30 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Thursday, February 28, 2013 10:52:42 PM UTC-5, timoth...@gmail.com wrote:

> ; The reason for doing this is so that if a user has their own
>
> ; STRSPLIT in their local user library, their version will superceed
>
> ; this one. RSI does not recommend this practice, but it is
>
> ; allowed for backwards compatability reasons. ...
>
>
>
> This seems a bit messy.

It's definitely messy, but I am not aware of other examples like it,. Thirteen years ago, RSI was overeager to respond to a user complaint that the new STRSPLIT function name stepped on an existing user function name. The solution of having a STRSPLIT wrapper around a new intrinsic function STRTOK() made things permanently more messy, but the mistake has not been repeated as far as I know.

But the situation could startle a user, unaware of the undocumented STRTOK(), who wrote a simple function

function strtok,x
return,x
end

and then finds

IDL> print,strtok(3)
7

I'll leave the question of why strtok(3) -- or strsplit(3) -- has a value of 7 as an exercise for the reader.

--Wayne
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Plot continuous line when have missing data points
Next Topic: Re: Plot continuous line when have missing data points

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

Current Time: Sat Oct 11 18:01:14 PDT 2025

Total time taken to generate the page: 1.27888 seconds