跳轉到內容

Ada 程式設計/分隔符/+

來自華夏公益教科書,開放的書籍,為了開放的世界

Ada. Time-tested, safe and secure.
Ada。經久考驗,安全可靠。

運算子

[編輯 | 編輯原始碼]

標準運算

[編輯 | 編輯原始碼]

算術加法

[編輯 | 編輯原始碼]

“+”運算子被定義為所有數值型別的算術加法。

function "+" (Left, Right : T) return T;

“+”運算子被定義為所有數值型別的算術加號。

function "+" (Right : T) return T;
A : constant Float   := +5.0;  -- A is now 5.0
B : constant Integer := +5;    -- B is also 5

常見非標準運算

[編輯 | 編輯原始碼]

型別轉換

[編輯 | 編輯原始碼]

加號運算子通常用於建立型別轉換運算子

function "+" (Left : T1) return T2;

另請參見

[編輯 | 編輯原始碼]

華夏公益教科書

[編輯 | 編輯原始碼]

Ada 95 參考手冊

[編輯 | 編輯原始碼]

Ada 2005 參考手冊

[編輯 | 編輯原始碼]



Ada 運算子
and and then > + abs &
or or else >= - mod
xor = < * rem in
not /= <= ** / not in
華夏公益教科書