What do you call "print", "variable" or "function" in each language? This table lines up INK, Python, PHP, C# (.NET) and Node.js word for word, so you can read any of them once you know one.
The INK column is highlighted. A greyed word means that language kept the same familiar term. On a phone, scroll the table sideways — the idea stays fixed on the left.
| What it does | INK | Python | PHP | C# / .NET | Node.js (JS) |
|---|---|---|---|---|---|
| Showing output | |||||
| Print to the screen | show | print() | echo | Console.WriteLine() | console.log() |
| Variables & constants | |||||
| Make a variable | let x = 5 | x = 5 | $x = 5; | var x = 5; | let x = 5; |
| A value that never changes | const | X = 5 (UPPER_CASE) | const / define() | const | const |
| Types of value | |||||
| A whole number | num | int | int | int | number |
| Words / letters (text) | text | str | string | string | string |
| Yes / no (true & false) | true / false | True / False | true / false | true / false | true / false |
| Functions | |||||
| Define a function | fn | def | function | int Name() | function |
| Send an answer back | return | return | return | return | return |
| "Gives back" (return type) | -> | -> (hint) | : type | type (before name) | — (TypeScript :) |
| Making decisions | |||||
| Do it only when true | if | if | if | if | if |
| Otherwise | else | else | else | else | else |
| Another condition | else if | elif | elseif | else if | else if |
| Is equal / not equal | == / != | == / != | == / != | == / != | === / !== |
| Loops (repeating) | |||||
| Count through a range | for i in 0..5 | for i in range(5) | for ($i=0; …) | for (int i=0; …) | for (let i=0; …) |
| Go through every item | (walk by index) | for x in xs | foreach | foreach | for…of |
| Repeat while true | while | while | while | while | while |
| Repeat forever | loop | while True | while (true) | while (true) | while (true) |
| Stop the loop / skip a turn | break / continue | break / continue | break / continue | break / continue | break / continue |
| Collections | |||||
| A list of things, in order | list [ ] | list [ ] | array [ ] | int[] / List<T> | Array [ ] |
| Look up a value by name (map) | { } | dict { } | [ "k" => v ] | Dictionary<K,V> | { } / Map |
| How many items | len() | len() | count() | .Length / .Count | .length |
| Built-in helpers | |||||
| Add up a list | sum() | sum() | array_sum() | .Sum() | .reduce() |
| Largest / smallest | max() / min() | max() / min() | max() / min() | Math.Max() / Math.Min() | Math.max() / Math.min() |
| Read a number typed by the user | input() | int(input()) | (int) readline() | int.Parse(Console.ReadLine()) | Number( … ) |
| Read a line of text | input_text() | input() | readline() | Console.ReadLine() | readline module |
| Read a file | read_file() | open().read() | file_get_contents() | File.ReadAllText() | fs.readFileSync() |
| Save a file | write_file() | open().write() | file_put_contents() | File.WriteAllText() | fs.writeFileSync() |
| Symbols & structure | |||||
| Add, subtract, multiply, divide | + - * / | + - * / | + - * / | + - * / | + - * / |
| Join text together | + | + | . (dot) | + | + |
| A block of code | { } | : + indent | { } | { } | { } |
| End of a statement | (none) | (none) | ; | ; | ; (optional) |
| A note to yourself (comment) | (not yet) | # | // | // | // |
Reading the table: most of INK's words are the same ones the older languages use (if, for, while, return) — that is on purpose. The highlighted differences (show, let, num, text, fn, loop) are where INK chose the plainer word.
The code page shows the same 22 programs written in all five languages, side by side.