Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.visual.basic    |    MS Visual Basic discussions, NOT dot-net    |    10,840 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 10,212 of 10,840    |
|    Karl E. Peterson to Geoff    |
|    Re: simple question on parameter passing    |
|    07 Sep 06 11:25:20    |
      From: karl@mvps.org              Geoff wrote:       > Consider the procedure       >       > Private Sub Adder(ByVal Num1 As Integer, etc. )       >       > End Sub       >       > which called by Call Adder( TxtNum1,.) where TxtNum1 is a text       > box.       >       > Why does Num1 accept the value as an integer when the actual       > parameter being passed is of type string? Why no type mismatch       > error??              That's one of the "features" introduced at VB4, and commonly referred to as       "Evil Type Coercion". If VB can coerce, it does. Here's an article I wrote       on that, way back when:               Coercion Aversion        http://vb.mvps.org/articles/pt199511.pdf              --              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca