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

Home » Public Forums » archive » Re: Concatenate elements of string array
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: Concatenate elements of string array [message #16647 is a reply to message #16643] Tue, 10 August 1999 00:00 Go to previous message
fireman is currently offline  fireman
Messages: 49
Registered: August 1991
Member
kluegel@lanl.gov wrote:
: Does anyone out there have a clever idea on how to
: concatenate all elements of a one dimensional array
: of strings?

I don't know how clever this is, but it worked for me:

IDL> string_array=['one ','string ','split ','into ','many ','array elements']
IDL> help,string_array & print,string_array
STRING_ARRAY STRING = Array[6]
one string split into many array elements
IDL> byte_array=byte(string_array)
IDL> byte_array=reform(byte_array,n_elements(byte_array))
IDL> byte_array=byte_array[where(byte_array ne 0)]
IDL> one_string=string(byte_array)
IDL> help,one_string & print,one_string
ONE_STRING STRING = 'one string split into many array elements'
one string split into many array elements

PLEASE would someone outside of gsfc let me know if you see this!
I've been having all sorts of trouble posting lately.
Tia.

--
-- Gwyn F. Fireman
-- General Sciences Corporation / MODIS Characterization Support Team
-- Gwyn.Fireman@gsfc.nasa.gov 301-352-2118
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: widget_control
Next Topic: Widget_Control

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

Current Time: Wed Oct 08 15:57:28 PDT 2025

Total time taken to generate the page: 0.00177 seconds