|
-
Oct 30th, 2013, 02:19 PM
#1
Thread Starter
Member
stepping backwards through array elements, passing values to function
I have a function that takes 2 elements of a string array as it's parameters. The function manipulates these and returns a modified version of both to their original indices. I need to send the current element's string value and the previous element's string value to the function:-
...(part of calling sub's code)...
Drg (BArr(I), BArr(I-1
Next I
Join(BArr2, vbNewLine)
End Sub
------------------------------------------------
Private Function Drg (BArr(I), BArr(I-1))
Is this the correct way to send and return the parameters? Or should they take new names in the function?
Is it permissible to refer to array elements as "I" and "I-1" ? I'm not sure how else to achieve this if not.
On a different note, if I refer to an integer variable in code that has not yet been assigned a value, will its value be 0?
Lastly, I'm using " " as a delimiter for joining. Some elements will include spaces within their string values. Will this cause any problems?
Hope its OK to ask so many questions in one go...
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|