以下自定义数据类型的语句中,正确的是( )。

admin2018-07-11  21

问题 以下自定义数据类型的语句中,正确的是(     )。

选项 A、Type student
    ID As String*20
    name As String*10
    age As Integer
    End student   
B、Type student
     ID As String*20
     name As String*10
     age As Integer
     End Type
C、Type student
    lD As String
    name As String
    age As Integer
    End student   
D、Type
      ID As String*20
      name As String*10
      age As Integer
     End Type student

答案B

解析 自定义数据类型的语法结构是:
    Type自定义类型名
    <成员名1>[(下标)]As<标准类型名1>
    <成员名2>[(下标)]As<标准类型名2>
    ……
  End Type
  其中,成员可以定义为定长的或不定长字符串,也可定义为数组。
    本题中,B选项符合语法规则,故B选项正确。
转载请注明原文地址:https://jikaoti.com/ti/yYy0FFFM
0

相关试题推荐
最新回复(0)