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

Home » Public Forums » archive » Re: Array string
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: Array string [message #38139 is a reply to message #38124] Sun, 22 February 2004 18:24 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Julio writes:

> I have an array string with 6 columns and 4 lines. In each array
> position I have words that I must extract. How can I do to transform
> this array in a 1 element string, with the words separated by spaces?

Just off the top of my head, how about something like this:

spaces = String(Replicate(32B,3)) ; Three spaces between words
words = Reform(array, 6*4)
line = words[0]
FOR j=1,N_Elements(words)-1 DO line = line + spaces + words[j]
Print, line

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Mark directory for exclusion from !PATH
Next Topic: Re: IDLgrModel, rotation angles

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

Current Time: Fri Oct 10 00:59:37 PDT 2025

Total time taken to generate the page: 3.83629 seconds