# Differences

This shows you the differences between two versions of the page.

 cl:functions:math-one-plus [2019/09/14 05:00] cl:functions:math-one-plus [2020/02/27 01:00] (current) Line 1: Line 1: + ====== Function 1+, 1- ====== + + ====Syntax==== + * **1+** //number// → //​successor// ​ + * **1-** //number// → //​predecessor//​ + + ====Arguments and Values==== + * //number// - a //​[[CL:​Glossary:​number]]//​. + * //​successor//,​ //​predecessor//​ - a //​[[CL:​Glossary:​number]]//​. + + ====Description==== + **1+** returns a //​[[CL:​Glossary:​number]]//​ that is one more than its argument //number//. **1-** returns a //​[[CL:​Glossary:​number]]//​ that is one less than its argument //number//. + + ====Examples==== + <​blockquote> ​ + (1+ 99) <​r>​100 + (1- 100) 99 + (1+ ([[CL:​Functions:​complex]] 0.0)) <​r>#​C(1.0 0.0) + (1- 5/3) <​r>​2/​3 + ​ + + ====Affected By==== + None. + + ====Exceptional Situations==== + Might signal **[[CL:​Types:​type-error]]** if its //​[[CL:​Glossary:​argument]]//​ is not a //​[[CL:​Glossary:​number]]//​. Might signal **[[CL:​Types:​arithmetic-error]]**. + + ====See Also==== + * **[[CL:​Macros:​incf|Macro INCF]]** + * **[[CL:​Macros:​decf|Macro DECF]]** + + ====Notes==== + <​blockquote> ​ + (1+ //number//) ≡ ([[CL:​Functions:​math-add|+]] //number// 1) + (1- //number//) ≡ ([[CL:​Functions:​math-subtract|-]] //number// 1) + ​ + + Implementors are encouraged to make the performance of both the previous expressions be the same. +

### Page Tools 