Hi
Seems like a basic question but I can't find an obvious answer...
When calling a procedure in VB I often get snow-blinded by the keywords and parameters (AKA 'arguments'). On the world's greatest operating system (ICL VME/B) we used SCL. One of SCL's features was to be able to call a proc with:
Call My_Test_Proc(False,False,"Fred",False,True,"Jim","False")
In this case, you have to try to remember the order, type and whether mandatory or optional.
But it would also let you specify:
Call My_Test_Proc(LockRec=False,AddNewRec=False,ContactName="Fred",ExtgContact=False,CreateDirEntry=True,FName="Jim",Employee="False")
Soooooo much easier to read and to amend...
Actually it would also let you specify:
Call My_Test_Proc(LockRec=False,ContactName="Fred",False,CreateDirEntry=True,FName="Jim")
So missing out optional parameters which would take their default... and it didn't care about the order... there were a dozen other features with SCL parameters ... far too many to go into here...
My question is then, is there the equivalent in VB?... so Call My_Proc(Keyword1=Parameter1 Value,Keyword2=Paramter2 Value)?
I've tried this and just get compile errors....
Thanks
Seems like a basic question but I can't find an obvious answer...
When calling a procedure in VB I often get snow-blinded by the keywords and parameters (AKA 'arguments'). On the world's greatest operating system (ICL VME/B) we used SCL. One of SCL's features was to be able to call a proc with:
Call My_Test_Proc(False,False,"Fred",False,True,"Jim","False")
In this case, you have to try to remember the order, type and whether mandatory or optional.
But it would also let you specify:
Call My_Test_Proc(LockRec=False,AddNewRec=False,ContactName="Fred",ExtgContact=False,CreateDirEntry=True,FName="Jim",Employee="False")
Soooooo much easier to read and to amend...
Actually it would also let you specify:
Call My_Test_Proc(LockRec=False,ContactName="Fred",False,CreateDirEntry=True,FName="Jim")
So missing out optional parameters which would take their default... and it didn't care about the order... there were a dozen other features with SCL parameters ... far too many to go into here...
My question is then, is there the equivalent in VB?... so Call My_Proc(Keyword1=Parameter1 Value,Keyword2=Paramter2 Value)?
I've tried this and just get compile errors....
Thanks