Hi Greg,
Thanks for your reply
Yeah - the ranges stuff was new to me (I'm just picking up vb for 6 months or so for a personal project) and I think that functionality will get used at some point.
Collections - yes, that's what I said above: "I know I could use arrays to simulate this for simple variables, but a lot of times it's useful to do it this way."
The drawback to this is that the object has to be an element of a collection, and can't just be an arbitrary object / interface item / function / variable in my VB project.
Let's say I have a dropdown list, or an ActiveX treeview, and I select a value or click a node, which returns a value.
This value could be an integer (great for for collections) or it could be a string value such as "red". The great thing about eval() is that you can just take the value "red", concatenate it with another value (say "Image") and have the programming language return a reference the object "redImage"... to which you might then call a method upon:
Code:
var pic=eval("red" & "Image")
pic.resizeTo(50,50)
It just allows you to write very powerful code, and is not in any way similar to classes at all. If I wrote a class to achieve the same, it probably use a collection to do something similar.
At the last count I write 12 languages, and I think I know what I'm talking about ... and either VB has it or it doesn't ... and it looks like it doesn't!
Thank you everyone for the help. By all means keep it coming, and I hope to converse with one or two of you again.
Cheers,
Dave Stewart