
Type PCB
Name As String 40
Time As Integer
Priority As Integer
State As String 40
End Type
PCB作为一个自定义的数据类型,不能放在私有模块内
你的程序应修改为:
添加一个模块,在模块内定义:
Type PCB
Name As String 40
Time As Integer
Priority As Integer
State As String 40
End Type
然后修改FORM的代码如下:
Dim a(1 To 20) As PCB
Dim b(1 To 6) As PCB
Dim count As Integer
Private Sub Command1_Click()
Dim strS1 As String 40, strS2 As String 40, strS3 As String 40
count = count + 1
strS1 = "please put into process ID" + Chr(13) + Chr(10) + "(P1,P2 )"
a(1)Name = InputBox$(strS1, "输入框", 100, 100)
strS2 = "please put into burst time(max 100)"
a(count)Time = InputBox$(strS2, "输入框", 100, 100)
strS3 = "please put into priority(1 to 6)"
a(count)Priority = InputBox$(strS3, "输入框", 100, 100)
a(count)State = "new"
End Sub
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)