Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在标准帕斯卡中,什么被认为是简单类型?这些是唯一可以从函数返回的类型吗?
根据规范,简单类型是整数、实数、布尔值、字符、枚举 ( (red, yellow, green, blue, tartan)) 和子范围 ( 1..100)。同样根据规范,函数只能返回simple-type-identifieror ( |) pointer-type-identifier。
(red, yellow, green, blue, tartan)
1..100
simple-type-identifier
|
pointer-type-identifier
帕斯卡中的简单类型,
整数表示数字,
浮点数实数,
字符为字符,
布尔值的真值,和
文本字符串
这是pascal中可以使用的基本类型,它们都可以从函数中返回