Tutorial Pemrograman Pascal : Operator Dalam Pemrograman Pascal - setelah mengenal bahasa pemrograman pascal dan mengenal variable dalam pemrograman pascal serta type data Constanta (konstanta) dalam pemrograman pascal berikutnya kita akan mempelajari Tutorial Pemrograman Pascal operator dalam pemrograman pascal.
Setiap programer baik itu programer pascal programer java atau programer lainnya operator dalam masing-masing bahasa pemrograman wajib diketahui dan difahami penggunaannya. Operator dalam pemrograman adalah sebuah simbol yang melambangkan atau menyatakan kepada kompiler untuk melakukan proses matematika atau proses logical manipulations (dikutip dari: tutorialspoint).
Pemrograman pascal memiliki beberapa operasi matematika (manipulasi logika) yang dapat dilakukan oleh compiler pascal diantarnya adalah:
- Arithmetic operators
- Relational operators
- Boolean operators
- Bit operators
- Set operators
- String operator
Arithmatic Operator ( operator aritmatika)
Relations Operator ( Operator Relasi )
| Operator | Description | Example |
|---|---|---|
| = | Checks if the values of two operands are equal or not, if yes, then condition becomes true. | (A = B) is not true. |
| <> | Checks if the values of two operands are equal or not, if values are not equal, then condition becomes true. | (A <> B) is true. |
| > | Checks if the value of left operand is greater than the value of right operand, if yes, then condition becomes true. | (A > B) is not true. |
| < | Checks if the value of left operand is less than the value of right operand, if yes, then condition becomes true. | (A < B) is true. |
| >= | Checks if the value of left operand is greater than or equal to the value of right operand, if yes, then condition becomes true. | (A >= B) is not true. |
| <= | Checks if the value of left operand is less than or equal to the value of right operand, if yes, then condition becomes true. | (A <= B) is true. |
Komentar
Posting Komentar