diff options
| author | Zuhaitz <zuhaitz.zechhub@gmail.com> | 2026-01-13 14:14:01 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-13 14:14:01 +0000 |
| commit | 791a6ab50150eb895282c2e3561fec71a6695f25 (patch) | |
| tree | cebd57b0e7207747f24cdc317a67667f4f21fc6f | |
| parent | 79eaac2257d66d1b10adcc11333f493eada7a923 (diff) | |
Fixed docs.
| -rw-r--r-- | README.md | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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."; ``` |
