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

Home » Public Forums » archive » a simple question about strings
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: A simple question about strings [message #48081 is a reply to message #27012] Mon, 20 March 2006 10:56 Go to previous messageGo to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Fritz wrote:
> Hello,
>
> The command
>
>> A = string(indgen(5))
>
> produces an array of five elements:
> [0 1 2 3 4 5]
>
> The command
>
>> B = '01234'
>
> produces an array of one element:
> 01234
>
> How to transform A so it becomes the same as B ?
>

Pick your poison...

IDL> print, strjoin(strtrim(indgen(5),2))
01234
IDL> print, indgen(5), format = '(5I1)'
01234
IDL> print, strcompress(strjoin(indgen(5)),/remove_all)
01234
IDL> print, string(indgen(5), format = '(5I1)')
01234

I'm sure there are other means, too.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to debug seg fault.
Next Topic: how to exchange variable between modal dialog and the main window?

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

Current Time: Sat Oct 11 00:12:10 PDT 2025

Total time taken to generate the page: 0.71990 seconds