Just caren't get away from the GoTo statement
This should get the University brigade out.
Thanks for mentioning GoTo Meg, totally agree with you, a basic part of any language. If you need to speed up apps use GoTos, if you don't then avoid them like the plague.
Does anyone know of a vb function that is totally useless???? Come on kedaman you must have another one. I only ask this to give bored members the chance to discover a hidden function, which they can then expierament with and give us back the results.
How about useless implementation instead?
Speaking for myself only of course:
I am an ex LISP (derivative) and a current Java / VB programmer. Although my experience in VB is limited, I must admit to getting tired of having to break down and otherwise good IF statement into two IF statements.
In Java, I might have written
if (not obj==null) and (obj.name=="something") {...
or in SML (the LISP derivative which has an object layer),
(if (and obj (= (get obj 'name) "something")) ...
Both of these would be fine since if the object was not initialised (but was declared mind you), I'd have an early exit from the IF statement. In VB6 however, if I write:
dim obj as MyObj
...
if (not (obj is nothing)) and (obj.name="something") then ...
then I get a runtime error because obj.name is evaluated regardless of whether the first clause is true or false.
I am no compiler or interpreter writer.. I think of those tasks as wonderful black boxes, which suits me fine. I'm sure there is also a very good reason why VB HAS to act this way but I guess old habits are hard to break.
For the sake of the thread (and I know this reply is a feeble attempt to maintain the gist of it...) I find the implementation of the IF statement in VB to be poor.
But that's probably just my previous experience showing through :)
Regards
Paul Lewis
What is imp and what is it used for?
Hi,
What is imp and what is it used for?