Thanks a bundle!

I have many uses for that!

Cheers

Brendon

----- Original Message -----
From: "Colin Holgate" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 04, 2002 12:56 PM
Subject: Re: <lingo-l> Importing comma delimited values from file.


> >But how do i create the array / list  from those?
>
>
> I'm not sure that getnettext from a CD-ROM text file is the right
> approach, but there are many ways to get the text in (in these
> examples, you've stuffed the text into a variable called thetext).
>
> As it's comma delimited, you can say:
>
> mylist = value("["&thetext&"]")
>
> In the special case of a comma, that's like a split(). Just for
> interest, here's another way that would work for comma or other
> delimiters:
>
>
> on split sometext,thedelimiter
>     oldid = the itemdelimiter
>     the itemdelimiter = thedelimiter
>     newlist = []
>     repeat with a = 1 to the number of items in sometext
>        append newlist, item a of sometext
>     end repeat
>     the itemdelimiter = oldid
>     return newlist
> end
>
> The itemdelimiter = oldid part is just to be polite, to make sure you
> haven't upset another routine somewhere. You would call the above
> function like this:
>
> mylist = split(thetext,tab)
>
> in the case where tab is the delimiter.
>
>
> [To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is
for learning and helping with programming Lingo.  Thanks!]
>


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to