From: Norman Palardy <[EMAIL PROTECTED]>
DIM reg1,reg2,reg3 as new regEx
But its not an error in any way shape or form
The syntax is perfectly correct it's just the result is NOT what you
think it is
If RB is so proud of it, they ought to at least document the behavior
in the manual very prominently. Interpreting it as creating 3 regEx
instances is a very natural thing to do, and it's a nasty and
hard-to-figure-out bug when it bits you.
Pg 199 of the user's guide gives no hint of this behavior, and in fact
says:
There is a shortcut syntax for declaring and instantiating objects.
You can place the
New operator in the Dim statement itself. Using this shortcut, you
can rewrite this
example as
Note the use of "objects", not "an object"
This behavior will bite a large fraction of the RB programmer
population at least
once, sooner or later. It is sometimes hard to appreciate that 30
minutes of
time wasted * thousands of programmers = man years of lost effort.
I am perhaps overly sensitive to such issues since I have been bitten
in the butt
by them so many times over the years that there is no longer any
flesh to chew on
there, so that they now nibble on more delicate areas.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>