We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Variable
Variable is a 3D grid-based esoteric programming language created by User:Pineapple. It is an extension of 9x9x9 (which in it's self is a variation of 3x3x3 ), featuring a memory layout consisting of a 9x9x9 cube (729 memory cells total) alongside additional control flow, cell manipulation, and I/O commands.
Overview
Memory is arranged in nine layers, with layer 1 at the bottom and layer 9 at the top. Each cell is referenced by a coordinate system consisting of a row, column, and layer.
Commands consist of a prefix character followed by 3-digit coordinates: XRCL or 4-digit numeric additions: VRCL
- V: The value being added (1–9).
- R: The target row (1–9).
- C: The target column (1–9).
- L: The target layer (1–9).
For example, 1111 adds the digit 1 to row 1, column 1, layer 1.
Values in cells accumulate. If you run 5111 twice, the value at position 111 becomes 10.
Commands
Variable retains all original numeric addition commands from 9x9x9 while adding specialized operations:
- VRCL: Adds digit V (1–9) to cell at RCL.
- 0000: Prints the ASCII character value of each memory position, following reading order from layer 9 down to layer 1.
- SVRCL: Subtracts digit V from target cell at RCL.
- CRCL: Clears the cell at RCL (sets value to 0).
- DRCL: Decrements the cell at RCL by 1.
- JRCL / KRCL: Jump loop conditional on target cell at RCL being non-zero.
- MRCL / PRCL: Mark source cell at RCL / Paste copied value into target cell at RCL.
- ORCL: Outputs target cell at RCL as an ASCII character.
- URCL: Outputs target cell at RCL as a raw number.
- RRCL: Reads user input into cell at RCL.
Memory layout
When executed, the program reads memory cells in the following order:
Layer 9
119 129 139 ... 199 219 229 239 ... 299 ... 919 929 939 ... 999
Layer 8
118 128 138 ... 198 218 228 238 ... 298 ... 918 928 938 ... 998
Layer 7
117 127 137 ... 197 217 227 237 ... 297 ... 917 927 937 ... 997
Layer 6
116 126 136 ... 196 216 226 236 ... 296 ... 916 926 936 ... 996
Layer 5
115 125 135 ... 195 215 225 235 ... 295 ... 915 925 935 ... 995
Layer 4
114 124 134 ... 194 214 224 234 ... 294 ... 914 924 934 ... 994
Layer 3
113 123 133 ... 193 213 223 233 ... 293 ... 913 923 933 ... 993
Layer 2
112 122 132 ... 192 212 222 232 ... 292 ... 912 922 932 ... 992
Layer 1
111 121 131 ... 191 211 221 231 ... 291 ... 911 921 931 ... 991
I/O
- 0000: Prints the ASCII character value of each memory position, following the reading order from layer 9 down to layer 1.
- ORCL: Outputs character at position RCL.
- URCL: Outputs numerical value at position RCL.
- RRCL: Reads input directly into position RCL.
Example programs
Setting coordinates
These commands demonstrate targeting specific positions on layer 1:
1111 1121 1131 1211 1311
Computational class
Turing complete (due to conditional jumping and unbounded or variable manipulation).
External resources
- No external resources yet.