Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:scriptsamples:byrefvsbyval [2015/09/14]
127.0.0.1 external edit
developer:scriptsamples:byrefvsbyval [2016/02/04] (current)
sandy
Line 1: Line 1:
 ====== ByRef vs ByVal ====== ====== ByRef vs ByVal ======
 > **Developer:​** //​[[developer:​rhinoscript|RhinoScript]]//​ > **Developer:​** //​[[developer:​rhinoscript|RhinoScript]]//​
-> **Summary:​** //Discusses VBScript argument passing.//+> **Summary:​** //Discusses VBScript argument passing//
  
-===== Also See ===== +Also see [[http://​wiki.mcneel.com/​developer/​scriptsamples/​parentheses|Cannot Use Parentheses When Calling Sub]].
-[[http://​wiki.mcneel.com/​developer/​scriptsamples/​parentheses|Cannot Use Parentheses When Calling Sub]]+
  
-===== Overview ===== +What exactly **ByRef** and **ByVal** ​means in VBScript ​has always been confusingThis is because VBScript uses //by reference// to mean two similar, but different things. VBScript supports
-There has always been confusion about what exactly **ByRef** and **ByVal** ​mean in VBScript. ​The confusion arises ​because VBScript uses "by reference" ​to mean two similar, but different things. VBScript supports+
  
   - Reference types   - Reference types
Line 31: Line 29:
 Both Blah and Baz are references to the same object. ​ The fourth line changes both Blah.Bar and Baz.Bar because these are different names for the same thing. Both Blah and Baz are references to the same object. ​ The fourth line changes both Blah.Bar and Baz.Bar because these are different names for the same thing.
  
-That's the "reference type" ​feature. ​ We say that VBScript treats objects as reference types.+That's the //reference type// feature. ​ We say that VBScript treats objects as reference types.
  
 Now consider this little program: ​ Now consider this little program: ​
developer/scriptsamples/byrefvsbyval.txt · Last modified: 2016/02/04 by sandy