天天看點

VB程式設計:Const自定義常量計算圓面積

Private Sub Command1_Click()

Const pi = 3.1415966     '定義常量pi

s = pi * Val(Text1.Text) ^ 2

Debug.Print s                  'Debug立即視窗輸出s的計算結果

End Sub

繼續閱讀