summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuhaitz <zuhaitz.zechhub@gmail.com>2026-01-13 14:14:01 +0000
committerGitHub <noreply@github.com>2026-01-13 14:14:01 +0000
commit791a6ab50150eb895282c2e3561fec71a6695f25 (patch)
treecebd57b0e7207747f24cdc317a67667f4f21fc6f
parent79eaac2257d66d1b10adcc11333f493eada7a923 (diff)
Fixed docs.
-rw-r--r--README.md10
1 files changed, 4 insertions, 6 deletions
diff --git a/README.md b/README.md
index ec078ed..256c022 100644
--- a/README.md
+++ b/README.md
@@ -270,9 +270,9 @@ Zen C allows you to use string literals directly as statements for quick printin
You can embed expressions directly into string literals using `{}` syntax. This works with all printing methods and string shorthands.
-```c
-int x = 42;
-char *name = "Zen";
+```zc
+var x = 42;
+var name = "Zen";
println "Value: {x}, Name: {name}";
"Value: {x}, Name: {name}"; // shorthand println
```
@@ -283,12 +283,10 @@ Zen C supports a shorthand for prompting user input using the `?` prefix.
- `? "Prompt text"`: Prints the prompt (without newline) and waits for input (reads a line).
- `? "Enter age: " (age)`: Prints prompt and scans input into the variable `age`.
- - Supports `int`, `float`, `char`, `string` types.
- Format specifiers are automatically inferred based on variable type.
```c
-int age;
-? "How old are you? " (age);
+var age = "How old are you? ";
println "You are {age} years old.";
```