您现在的位置:小学生自学网>> 信息>> 学习电脑

pascal语言中,记录类型用到的保留字为

作者: 来源: 发布时间:2015年10月20日 点击数:
 

pascal语言中,记录类型用到的保留字为

    Arecord    Bstruct    Cbaidu    Dthen

 

 

保留字
and array begin case const div do downto
else end file for function goto if in
label mod nil not of or packed procedure
program record set then to type until
var while with
标识
标准常量:false maxint true
标准类型:boolean char integer real text
标准文件:input output
标准函数:abs arctan chr cos eof eoln
exp ln odd ord pred round
sin sqr sqrt succ trunc
标准过程:dispose get new pack page put pead
readln reset rewrite unpack white writeln

 

 

标准Pascal语言中的保留字一共有36个. 
可以分为六种类型: 
1、 程序、函数、过程的符号: 

(1)program 程序 

(2)function 函数 

(3)procedure 过程 

2、 说明部分的专用定义符号 

(4)array 定义数组 

例如:type data=array[1..100] of integer; 

(5)const 常量说明 

例如:const pi=3.1415926; 

(6)file 文件类型 

例如:type text=file of char; 

(7)lable 标号说明 

格式:lable 标号1,标号2,……; 

(8)packed 指令(记录) 

(9)var 变量说明 

例如:var a,b,c:integer; 

(10)record 记录类型 

例如:type studata=record 

age:integer; 

sex:char; 

chinese:real; 

maths:real; 

english:real; 

end; 

(11)set 集合类型 

例如:type num1=set of 1..10; 

(12)type 类型说明 

例如:定义“daytype”表示有关日期的数据类型名: 

type daytype=(sun,min,tue,wed,thu dri,sat); 

(13)of (见case、array、set、file)