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

Home » Public Forums » archive » Splitting An Array Of Strings Without Using Loops
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Splitting An Array Of Strings Without Using Loops [message #35881] Thu, 24 July 2003 21:42 Go to previous message
darrick.white is currently offline  darrick.white
Messages: 7
Registered: January 2003
Junior Member
This is probably simple, but I'm having a time trying to figure it
out. I want to be able to split an array of strings without using
loops.

Example:
dataPoints is an array of strings with N elements
The format of each element within dataPoints is "x:y1:y2:y3:yn". More
than likely, the data will be in the format of x:y".

This array will become data points (the first element is always
considered the x coordinate): (x,y) = 1,23. In case of multiple
points (2:21:34:54), the data will look like: (2,21), (2,34), (2,54).

I need a way to take:
dataPoints[0] = 1:23
dataPoints[1] = 2:32
dataPoints[2] = 3:30
dataPoints[3] = 4:45


and create
points[2,4]
1 23
2 32
3 30
4 45

-Darrick
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: where is my plot....
Next Topic: Reading RINEX files into IDL

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

Current Time: Fri Oct 10 07:24:46 PDT 2025

Total time taken to generate the page: 1.92326 seconds