>>It's not clear, though, that the variable he is using is a string. He 
>>didn't say so, and it could just as easily be an integer.
>
>Sorry, this may sound like a stupid question, but how  then is one able to 
>differentiate?

Good question. The answer is, you can't tell from his post. In fact, in 
Lingo, you can't tell what a variable is unless you see what is assigned to it.

Some languages, like Pascal, are strongly typed. That is, you have to 
declare a variable up front, tell the compiler what it is (string, integer, 
float, etc.), and us it *only* as it is declared. If you try to put a 
number into a string variable, a Pascal compiler will scold you.

Other languages like C are also typed, but not as strongly. You still have 
to declare the variables, and the type, but there are ways of getting other 
data into them, like using CAST or passing a pointer to a function. Don't 
worry about what all that gobbledygook means--it's irrelevant to Lingo.

Lingo is completely untyped. You don't have to declare a variable at 
all--just use it. You can put a string in it on one line, and a number the 
next. It's one of the things that gives Lingo a lot of flexibility, but it 
also often leads to puzzling bugs.

Cordially,

Kerry Thompson


[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!]

Reply via email to