Prev: crack for VSFlex8 in VB6.0
Next: Component Handles
From: Karl E. Peterson on 6 Oct 2009 18:09 Scott M. wrote: > "Karl E. Peterson" <karl(a)exmvps.org> wrote in message > news:%23L5t0ksRKHA.1792(a)TK2MSFTNGP04.phx.gbl... >> Scott M. wrote: >>> "Call" is a keyword that originated with classic VB. >> >> Bull. How old are you, anyway? > > You disagree that "Call" originated with classic VB? LOL! > I don't see how *my* age has anything to do with anything since I'm not the > one making childish remarks. You don't seem to remember much more than 10 or 15 years ago. Just wanted to know if that was to be expected, or your simply retarded. Ever hear of Fortran? ASM? -- ..NET: It's About Trust! http://vfred.mvps.org
From: Scott M. on 6 Oct 2009 18:20 "Mike Williams" <Mike(a)WhiskyAndCoke.com> wrote in message news:uwe2Z8sRKHA.4048(a)TK2MSFTNGP05.phx.gbl... > "Scott M." <s-mar(a)nospam.nospam> wrote in message > news:uBa8DesRKHA.1876(a)TK2MSFTNGP06.phx.gbl... > You can disagree all you want, Scotty. Whether you agree or not means > nothing to me because you are a not important and your presence here is > not required. > Mike Great. Now that we both agree we could care less about each other, maybe you'll stop posting rants at me.
From: Bob Butler on 6 Oct 2009 18:18 "deactivated" wrote in message news:4acbbdf3.35256531(a)news.newshosting.com... > On Mon, 5 Oct 2009 21:31:25 -0400, "MikeD" <nobody(a)nowhere.edu> wrote: > >>You're mistaken. The Call keyword is NEVER required in VB6 either. You >>just >>have to make sure you're using the right syntax. > > I once spent a complete hour to sort that out and the effects are > subtle. > Here goes. > > Private Function DoThing(byref value as long) as long > Dim va;ue as long > ' some code > value = 2 * value > DoThing = value > End function > > dim lngValue as Long, lngPassed as Long > > lngPassed = DoThing lngValue That's not valid syntax > lngValue will have the new value, same as lngPassed > > lngPassed = DoThing(lngValue) ==Note parenthesis > lngValue is now passed ByVal ! No, that's valid syntax and the parameter will be changed. You would need extra parens to prevent the value from changing as in lngPassed = DoThing((lngValue)) > Call will prevent getting the value of lngPassed but will have the > same effect as previously. > > Call DoThing( lngValue ) parenthesis are needed. This is still passed > ByRef. > > Call DoThing(( lngValue )) note the double parenthesis:. This is now > passed ByVal. That's the effect but it's more correct that VB evaluates the expression, passes the result ByRef, then discards the returned value: temp=(lngValue) Call DoThing(temp) "temp" gets updated but since there's no way to reference the temp value that VB created when evaluating the expression any change is effectively lost. It's the same as Call DoThing(lngValue+1) or any other expression that must be evaluated before the result is passed. Where it gets confusing for people new to VB is when CALL is omitted: DoThing (lngValue) is the same as Call DoThing((lngValue)) and not at all the same as Call DoThing(lngValue)
From: Scott M. on 6 Oct 2009 18:22 "Karl E. Peterson" <karl(a)exmvps.org> wrote in message news:eDiDzGtRKHA.1236(a)TK2MSFTNGP05.phx.gbl... > Ever hear of Fortran? ASM? Sure I have, but since those languages are not VB, they are not related to my response. No one is asking about the use of Call in those languages. I'm talking about when Call originated in the VB language. That is what this topic is about. Not ForTran or ASM. -Scott
From: Karl E. Peterson on 6 Oct 2009 18:22
Karl E. Peterson wrote: > Scott M. wrote: >> I don't see how *my* age has anything to do with anything since I'm not the >> one making childish remarks. > > You don't seem to remember much more than 10 or 15 years ago. Just wanted to know > if that was to be expected, or your simply retarded. ^^^^ Allow me to save you the trouble of offering a spelling flame. That should've been "you're" of course, as in "you are simply retarded" - HTH! -- ..NET: It's About Trust! http://vfred.mvps.org |