📄 attributes.adb
字号:
--Attributes
--Ada also provides the ability to enquire about a type or object from within
--the code by using attributes. Some of the attributes for
--discrete types are
with Text_IO; use Text_IO;
procedure attributes is
begin
Put ("Integer'first"); -- the smallest Integer
Put ("Integer'last"); -- the largest integer
Put ("Processors'succ(M68000)"); -- successor of the M68000
Put ("Upper_Chars'pred('C')"); -- the predecessor of 'C' ('B')
Put ("Integer'image(67)"); -- the string " 67" -- space for a '-'
--put("Integer'value("67")") ;-- the integer 67.
Put ("Processors'pos(M68030)"); -- the position of M68030 in the type.
-- (3, position 0 is first).
end attributes;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -