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

Home » Public Forums » archive » Re: An IDL STRTOK??? Was: TextoIDL Broken and Gone?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: An IDL STRTOK??? Was: TextoIDL Broken and Gone? [message #23310] Wed, 17 January 2001 08:59
Matt Craig is currently offline  Matt Craig
Messages: 3
Registered: January 2001
Junior Member
In article <943slr$b3i$1@newsserv.zdv.uni-tuebingen.de>,
wilms@astro.uni-tuebingen.de (Joern Wilms) wrote:
[snip]

> A while back I was in contact with Matthew Craig and we were allowed
to host
> textoidl at
>
> http://astro.uni-tuebingen.de/software/idl/textoidl/index.ht ml
>
> I have not heard from him since, but the code on the web-page runs on
5.3

Thanks for making that available on your site!

Feel free to keep hosting your version, but I have (finally) released a
new version myself that runs on 5.3. It is at:

http://physweb.mnstate.edu/mcraig/TeXtoIDL/

Also see the post I wrote yesterday about the changes to the copyright
and stuff (or just look at the new copyright file).

Matt Craig
--
Matt Craig
Assistant Professor, Dept of Physics and Astronomy
Minnesota State University Moorhead
(218) 236-2439


Sent via Deja.com
http://www.deja.com/
Re: An IDL STRTOK??? Was: TextoIDL Broken and Gone? [message #23349 is a reply to message #23310] Mon, 15 January 2001 15:13 Go to previous message
landsman is currently offline  landsman
Messages: 93
Registered: August 1991
Member
A couple of historical notes on strtok and textoidl:

1. In the V5.3 beta distibution, there was an intrinsic routine STRSPLIT
to split a string into substrings. But this caused conflict with a
user procedure strsplit.pro in a widely-distributed large IDL package.
So RSI attempted to avoid this conflict by renaming the intrinsic
procedure STRTOK and making STRSPLIT a procedure that simply called
STRTOK (so that the user procedure strsplit.pro could be given
precedence in the !PATH if desired). Unfortunately, this now caused a
conflict with the procedure strtok.pro in the widely distributed
textoidl package.

2. There is a duplicate version of the textoidl package at

http://astro.uni-tuebingen.de/software/idl/textoidl/index.ht ml

but this has the same strtok compatibility problem for V5.3 and later.
As Mirko mentioned, one simply has to rename strtok.pro and the calls to
strtok in Translate_Sub_Super.pro

Changing subjects, one recent change I've discovered going from V5.3 to
V5.4 that I'm not sure has been mentioned yet, is that one can no longer
read past the end of a file with ASSOC. Below is a simple test
program that tries to read 20 bytes from a 10 byte file. In V5.3 the
extra 10 bytes are padded with zeros, while in V5.4 there is an error.

I think I prefer the V5.4 behaviour so this is arguably a bug fix.
Still, I had to fix up some older code in order to get it to work under
V5.4.

--Wayne Landsman landsman@mpb.gsfc.nasa.gov

pro test
openw,lun,'test.dat',/get_lun
writeu,lun,bindgen(10) ;Write 10 bytes
close,lun & openr,lun,'test.dat' ;Close the file & open for
reading
a = assoc(lun,bytarr(20) ) ;Associate with a 20 byte array
print,a(0)
free_lun,lun
return
end

STIS>print,!VERSION
{ sparc sunos unix 5.3 Nov 11 1999}
STIS>test
0 1 2 3 4 5 6 7 8 9 0 0 0 0 0 0 0
0 0 0

IDL> print,!VERSION
{ sparc sunos unix 5.4 Sep 25 2000 32 64}
IDL> test
% End of file encountered. Unit: 113, File: test.dat
% Execution halted at: TEST 8
/stis0/data31/landsman/iraf/test.pro
% $MAIN$


Sent via Deja.com
http://www.deja.com/
Re: An IDL STRTOK??? Was: TextoIDL Broken and Gone? [message #23351 is a reply to message #23349] Mon, 15 January 2001 14:04 Go to previous message
Mirko Vukovic is currently offline  Mirko Vukovic
Messages: 124
Registered: January 1996
Senior Member
In article <onbst8eczg.fsf@cow.physics.wisc.edu>,
craigmnet@cow.physics.wisc.edu wrote:
>
> davidf@dfanning.com (David Fanning) writes:
>> Nick Bower (bowern@ses.curtin.edu.au) writes:
>>
>>> This really sucks and it's most unfortunate that such a well-known
>>> package like this has been inadvertently clobbered without a hint
of
>>> documentation.
>>

To fix the thing on my machine, I had to do the following:

1) rename the file strtok.pro and the function name in it (I chose
StrUpToTok).

2) In file Translate_Sub_Super.pro change calls to StrTok to (in my
case) StrUpToTok on lines 227-x and 292-x (where - stands for ``minus''
and x is about 5 -- I actually increased the length of the file by
documenting the change :-))

But as Craig? pointed out, one may not be able to distribute the file
due to copyright issues.

Now, a bit off topic, where does one find the post-script codes for the
symbols, in case one extends the translation table?

Mirko


Sent via Deja.com
http://www.deja.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: An IDL STRTOK??? Was: TextoIDL Broken and Gone?
Next Topic: Re: Merging Bytarr

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

Current Time: Fri Oct 10 12:20:31 PDT 2025

Total time taken to generate the page: 1.28145 seconds