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

admin2020-04-18  45

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

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

答案B

解析 Type语句用于在模块级别中定义一个用户自己的数据类型,其本质上是一个数据类型集合,它含有一个或一个以上的元素,每个元素可以被定义为不同的数据类型。自定义类型中的元素可以是变长字符串,也可以是定长字符串。但在随机文件中使用时,必须使用定长字符串,一般格式为:String*常数。其中,“常数”是用于指定字符串长度的数。
转载请注明原文地址:https://kaotiyun.com/show/svTp777K
0

随机试题
最新回复(0)