: I've seen ":=" in VB before and not known what to do with it. It seems like you could just leave it out and it would work fine to me, but I never really looked into it to see what it did.
:
: For example, in the MSDN Help file for VB6, the example given for SaveSetting is:
:
: SaveSetting appname := "MyApp", section := "Startup", _
: key := "Top", setting := 75
:
:
: when it seems to me that the below would work just as well..
:
: SaveSetting "MyApp", "Startup", "Top", 75
:
:
: I'm not sure why the former is given as an example though..
:
AHHHHHHH!!!!!! I had forgotten all about that. That is called named parameters and only seems to be supported by certain functions that VB knew about beforehand (like Windows' messages that VB knows to create events for).
All of the following will work (assuming I didn't mess them up):
SaveSetting section := "Startup", appname := "MyApp", _
key := "Top", setting := 75
SaveSetting appname := "MyApp", setting := 75, _
section := "Startup", key := "Top"
SaveSetting appname := "MyApp", key := "Top", _
setting := 75, section := "Startup"
Why anyone would want to use the idea, I have no idea. But it basicly lets you put the parameters in any order you like by naming which one is which.
Unfortunately, that's unrelated to the syntax in the current question...