Yep, it's called a list. Here's the approach (untested):
on GetWords theLineOfText
-- may want to fiddle with "the itemdelimiter" here
nWords = the number of words in theLineOfText
listOfWords = []
repeat with i = 1 to nWords
thisWord = word i of theLineOfText
append(listOfWords, thisWord)
end repeat
return listOfWords
end
Irv
At 11:31 AM -0500 6/7/01, Tyler F Gamsby wrote:
>I am pulling one random line out of a text file, and each line has a
>different number of words. I want to break the line into words by
>assigning each word to a different variable. I have that part
>working fine, except, if I have 2 lines, one with 2 words and one
>with 5, I have had to create 5 variables and then 3-5 would be null.
>I wondered if there was a dynamic way to create variables.
>
>If anybody can help, I appreciate it.
>
>Tyler
>--
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/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!]
--
Lingo / Director / Shockwave development for all occasions.
(Home-made Lingo cooked up fresh every day just for you.)
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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!]