编译程序构造与实践教程第六章.pptVIP

  • 1
  • 0
  • 约1.62万字
  • 约 61页
  • 2019-09-10 发布于辽宁
  • 举报
类型构造符如下: (i) 数组类型构造符array (ii) 结构类型构造符record (iii)指针类型构造符pointer (iv)函数类型构造符→ (v) 卡氏积× 类型表达式的例子。 例 数组类型表达式之例 设有C语言的一维数组变量说明如下: int A[8]; 则与A相关联的类型表达式是:array(0..7, integer) 例 结构类型表达式之例 设有C程序片断: typedef struct { int No; char name[8]; float ave_score; } StudentType; StudentType StudentScore[40]; 则与StudentType相关联的类型表达式是: record((No ? integer)?(name?array (0..7, char))? (ave_score?real)) 而与StudentScore相关联的类型表达式是: array(0..39, StudentType) 例

文档评论(0)

1亿VIP精品文档

相关文档