home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!usenet.ucs.indiana.edu!silver.ucs.indiana.edu!bdwheele
- From: bdwheele@silver.ucs.indiana.edu (Brian Wheeler)
- Subject: Re: visual basic question
- Message-ID: <Bx8yJs.M8K@usenet.ucs.indiana.edu>
- Sender: news@usenet.ucs.indiana.edu (USENET News System)
- Nntp-Posting-Host: silver.ucs.indiana.edu
- Organization: Indiana University
- References: <BwwBnt.Ju5@undergrad.math.waterloo.edu>
- Date: Thu, 5 Nov 1992 14:21:28 GMT
- Lines: 34
-
- In <BwwBnt.Ju5@undergrad.math.waterloo.edu> rcsteele@cantor.math.uwaterloo.ca (Robert C Steele) writes:
-
- >Hi. Why cant an array be passed as both BYVAL and as call by reference?
- >When i try to do something like:
-
- > sub test(Byval Data_Array() as integer)
-
- >it doesnt work. The manual & help says that all user defined types are passed
- >BYVAL but nothing about arrays.
-
- >Thanks in advance,
- >Rob
-
- Why do you need to pass an array by BYVAL? If you're wanting to alter a copy
- of the array in the sub but don't want to alter the original, I think you can
- put parens around the variable and it will make a copy of it (it works for
- non arrays).
-
- ex:
- Sub Test (Index as Integer, AnArray() as Integer)
- ...
- End Sub
-
- Test 5,(AnArray())
-
- This might work.
-
- Brian Wheeler
- I could be wrong, ya know!
- --
- ******************************************************************************
- * Brian 'Nautical' Wheeler - These are my opinions, do you hear me? MINE!
- * "Wombats are our friends" - Me
- ******************************************************************************
-