Due to a recent post that spent quite some time trying to fix a script that refused to correctly deal with a decimal value.. I thought it would be useful to provide this link:
http://www.ddj.com/documets/s=1503/ddj0001vs/jan00.htm
It is basically a series of issues that exist when using VB (or VBscript) that M$ decided to add for entertainment value. Most of these (all of them??) where absent from Basic back when using M$ QuickBasic, so I find it quite insane that they are present in the new supposedly improved versions...
Note: Other issues not included in the list>
Gotcha #1:
No need to worry about the 'DIM A, B, C AS INTEGER' issue in VBscript. You can't declare types for variables anyway, so everything is a variant, though the VBscript engine will try to 'guess' what it contains based on the contents and what you try to do with it. Hope it guesses right!!
Gotcha #2:
IF A OR B THEN
Is this a logical OR like C's || or a bitwise OR like C's |?
Answer: It 'guesses' which one you want.
Gotcha #3: (only in full VB I believe, but...)
a.multiline = vbTrue
Won't work in VB, since it is according to the VB docs a "design time" feature?!? This also means that you cannot enable "design time" mode for controls, which is intended to let you drag-drop and resize them. Apparently since VB provides a form designer, they figured the only controls you care about are the ones you already placed on a form. The idea that you may actually want/need to create one that is not already there and let the user place it is something you just don't need to do in VB according to M$.
In VBscript you 'may' have access to the multiline property (nice of them to allow this...), but you probably can't drag and drop or resize control directly in it either and not just because you have to have a control container enabled client to display them (which Mushclient isn't).
There also seems to be some issues with using controls like InetCtls with timers, but hopefully Nick can figure that one out, since it appears to be a client vs control issue. ;)
http://www.ddj.com/documets/s=1503/ddj0001vs/jan00.htm
It is basically a series of issues that exist when using VB (or VBscript) that M$ decided to add for entertainment value. Most of these (all of them??) where absent from Basic back when using M$ QuickBasic, so I find it quite insane that they are present in the new supposedly improved versions...
Note: Other issues not included in the list>
Gotcha #1:
No need to worry about the 'DIM A, B, C AS INTEGER' issue in VBscript. You can't declare types for variables anyway, so everything is a variant, though the VBscript engine will try to 'guess' what it contains based on the contents and what you try to do with it. Hope it guesses right!!
Gotcha #2:
IF A OR B THEN
Is this a logical OR like C's || or a bitwise OR like C's |?
Answer: It 'guesses' which one you want.
Gotcha #3: (only in full VB I believe, but...)
a.multiline = vbTrue
Won't work in VB, since it is according to the VB docs a "design time" feature?!? This also means that you cannot enable "design time" mode for controls, which is intended to let you drag-drop and resize them. Apparently since VB provides a form designer, they figured the only controls you care about are the ones you already placed on a form. The idea that you may actually want/need to create one that is not already there and let the user place it is something you just don't need to do in VB according to M$.
In VBscript you 'may' have access to the multiline property (nice of them to allow this...), but you probably can't drag and drop or resize control directly in it either and not just because you have to have a control container enabled client to display them (which Mushclient isn't).
There also seems to be some issues with using controls like InetCtls with timers, but hopefully Nick can figure that one out, since it appears to be a client vs control issue. ;)