summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-28 11:21:30 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-28 11:21:30 +0000
commit7ebc9c94207ef3e17e86c629c333444869e2a112 (patch)
tree3abf386ac230979a25246504bc398718f76fefb7
parent11dbed3dc6e3c4ec154aab302088a2695c2c4052 (diff)
Related to #137
-rw-r--r--README.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/README.md b/README.md
index d59c3ad..9550208 100644
--- a/README.md
+++ b/README.md
@@ -478,6 +478,11 @@ Zen C supports operator overloading for user-defined structs by implementing spe
| **Index** | `a[i]` | `get(a, i)` |
| | `a[i] = v` | `set(a, i, v)` |
+> **Note on String Equality**:
+> - `string == string` performs **value comparison** (equivalent to `strcmp`).
+> - `char* == char*` performs **pointer comparison** (checks memory addresses).
+> - Mixed comparisons (e.g. `string == char*`) default to **pointer comparison**.
+
**Example:**
```zc
impl Point {