Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21273

Copies function?

$
0
0
Is there a VB function that will return "n" copies of a value? For example, is there a way to generate an array containing 7 9's?

I'd like something like this:

Code:

Dim myarray()
myarray = copies(9,7)
?myarray
9 9 9 9 9 9 9

(I realize that the ?myarray won't work. It's just for illustration).

Viewing all articles
Browse latest Browse all 21273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>