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 5 years have passed since last update.

vbsの作法 その9

Posted at

概要

vbsの作法、調べてみた。
ズンドコやってみた。

写真

image

サンプルコード

Dim zundoko, loopCnt, result, tempResults

loopCnt = 0
Set zundoko = CreateObject("System.Collections.ArrayList")
Do While True
	If loopCnt > 5 Then
		loopCnt = 0
	End If
	If Rnd < 0.5 Then
		zundoko.add "ズン"
	Else
		zundoko.add "ドコ"
	End If
	If loopCnt = 4 Then
		result = zundoko(zundoko.Count - 5) & zundoko(zundoko.Count - 4) & zundoko(zundoko.Count - 3) & zundoko(zundoko.Count - 2) & zundoko(zundoko.Count - 1)
		If result = "ズンズンズンズンドコ" Then
			Exit Do
		End If
	End If
	loopCnt = loopCnt + 1
Loop
result = ""
For Each item In zundoko
	result = result & item
Next
MsgBox result & " キ・ヨ・シ!"


以上。

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?