4D v16.3Numerische Operatoren |
|||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
Numerische Operatoren
|
Operation | Syntax | Ergibt | Ausdruck | Wert |
Addition | Zahl + Zahl | Zahl | 2 + 3 | 5 |
Subtraktion | Zahl – Zahl | Zahl | 3 – 2 | 1 |
Multiplikation | Zahl * Zahl | Zahl | 5 * 2 | 10 |
Division | Zahl / Zahl | Zahl | 5 / 2 | 2,5 |
Ganzzahlige Division | Zahl \ Zahl | Zahl | 5 \ 2 | 2 |
Modulo | Zahl % Zahl | Zahl | 5 % 2 | 1 |
Exponent | Zahl ^ Zahl | Zahl | 2 ^ 3 | 8 |
Der Modulo Operator % dividiert die erste Zahl durch die zweite und übergibt den ganzzahligen Restwert. Beispiele:
WARNUNG:
Bildoperatoren
Bit Operatoren
Boolean Operatoren
Datumsoperatoren
Operatoren
String Operatoren
Vergleichsoperatoren
Zeitoperatoren
Produkt: 4D
Thema: Operatoren
4D Programmiersprache ( 4D v16)
4D Programmiersprache ( 4D v16.1)
4D Programmiersprache ( 4D v16.2)
4D Programmiersprache ( 4D v16.3)