PUBLIC
该关键字用于声明一个公共方法、变量或者属性。
公共变量、方法或属性可以在类代码的外面使用。
Examples
PUBLIC iCounter AS Integer
Public Sub Test()
DIM iLocal AS Integer
iCounter = iCounter + 1
iLocal = iLocal + 1
PRINT "PUBLIC:"; iCounter; " DIM:"; iLocal
End
For I As Integer = 1 to 4
Test()
Next
PUBLIC:1 DIM:1
PUBLIC:2 DIM:1
PUBLIC:3 DIM:1
PUBLIC:4 DIM:1
参见