Advertisement
ASP_Volume3 String Manipulation #62646

Text Progress Bar

Give this function a number from 0 to 100, and it will generate a cool progress bar made of text!

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
Function MakePercentBar(ByVal Value As Long) As String
Dim i As Long
MakePercentBar = "["
For i = 1 To ((Value - 1) \ 10)
  MakePercentBar = MakePercentBar + "-"
Next i
MakePercentBar = MakePercentBar + "|"
For i = 10 To ((Value - 1) \ 10) + 2 Step -1
  MakePercentBar = MakePercentBar + "-"
Next i
MakePercentBar = MakePercentBar + "]"
End Function
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine