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

Home » Public Forums » archive » Re: strjoin - IDL 4 dummies
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: strjoin - IDL 4 dummies [message #46369] Tue, 15 November 2005 09:14
savoie is currently offline  savoie
Messages: 68
Registered: September 1996
Member
"Liberum" <shejo284@gmail.com> writes:

> Hi
>
> Having a problem with strjoin when doing the following:

> s = strjoin(["some_path_to_files", exp, date, '*h5'],"/",/single)
> IDL prints:
> STRING
> /data/proj/safworks/sheldon/MSG_PPS_COMP/data/pps/cloudmask/
> 200412/*hdf
>


I'd be most concerned that IDL is apparently changing the '*h5' into '*hdf'.

Barring that's not a problem, look at strcompress(string, /remove_all)


Matt
Re: strjoin - IDL 4 dummies [message #46374 is a reply to message #46369] Tue, 15 November 2005 07:40 Go to previous message
Ricardo Bugalho is currently offline  Ricardo Bugalho
Messages: 22
Registered: March 2005
Junior Member
On Tue, 15 Nov 2005 04:58:19 -0800, Liberum wrote:

> date = string(date)

Isn't the space introduced here?
Re: strjoin - IDL 4 dummies [message #46375 is a reply to message #46374] Tue, 15 November 2005 07:15 Go to previous message
Robert Moss is currently offline  Robert Moss
Messages: 74
Registered: February 1996
Member
Liberum wrote:
> Hi
>
> Having a problem with strjoin when doing the following:
>
> date = string(date)
> print, size(date,/tname)
> s = strjoin(["some_path_to_files", exp, date, '*h5'],"/",/single)
> print, s
> where date exp is already a string.
> IDL prints:
>
> STRING
> /data/proj/safworks/sheldon/MSG_PPS_COMP/data/pps/cloudmask/
> 200412/*hdf
>
> Now, it is this space that I cannot get rid of. I am certain that
> everything element in the list are strings but this space still shows
> up.
>
> Any help is greatly appreciated,
> Lib
>

I cannot see the space in your post, but I am guessing it is just before
the date. Try this

date = strtrim( date, 2 )

This will remove leading and trailing spaces, which string() does not.

--
Robert Moss, PhD
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: widget ?
Next Topic: Re: How to avoid texture-map overlapping?

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

Current Time: Wed Oct 08 13:49:19 PDT 2025

Total time taken to generate the page: 0.00454 seconds