Would the following be a problem? (It's from the Director
Documentation).

"do
Usage
do stringExpression

Using uninitialized local variables within a do command creates a
compile error. Initialize any local variables in advance. 

Note: This command does not allow global variables to be declared; these
variables must be declared in advance."

It would be nice to be able to create variables on the fly. It seems so
simple but once tried is very puzzling, at least form me.


Faisal






-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mentor,
Kraig
Sent: Thursday, May 26, 2005 9:17 AM
To: Lingo programming discussion list
Subject: RE: <lingo-l> Using repeat loops to assign values to variables

Mabye...

 
repeat with i = 1 to 3
        do "myVariable" & string(i) && "=" && string(something)
end repeat

..will work for you?

Kraig

     | -----Original Message-----
     | From: [EMAIL PROTECTED] 
     | [mailto:[EMAIL PROTECTED] On Behalf 
     | Of George S. Roland
     | Sent: Thursday, May 26, 2005 10:04 AM
     | To: Lingo-L
     | Subject: <lingo-l> Using repeat loops to assign values 
     | to variables
     | 
     | I am sure there must be a simple way to do this, but I'm 
     | having trouble figuring out what it is.
     | 
     | Say I have numbered variables:
     | myVariable1, myVariable2, myVariable3, etc.
     | 
     | Is there a way to initialize them with a loop such as:
     | 
     | repeat with i = 1 to 3
     |  set myVariable(i) = something
     | end repeat
     | 
     | All suggestions appreciated!
     | 
     | Thanks,
     | 
     | George
     | [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!]

[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