0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

VBScriptで配列への要素追加(Push)

Posted at

まだまだ現役?
Windows上でサクッと処理したいときの配列操作に

Push.vbs
arr1 = Array("aa", "bb")

Push arr1, "cc"

For Each elm In arr1
	MsgBox elm
Next

WScript.Quit

'--

Sub Push(p1, p2)
	ReDim Preserve p1(UBound(p1) + 1)
	p1(UBound(p1)) = p2
End Sub
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?