Given some code in your language as a string, find and display all the variable names.
Examples in pseudocode:
a=2
b=3
for(i, 0->9) do b=b-10
if a=b then write "a equals b"
Returns: a b i
abcdefgh=20000000000000
bcdifhgs="hello"
if abcdefgh=bcdifhgs then da44="hax"
if abcdefgh*2=da44 then write da44
Returns: abcdefgh bcdifhgs da44
2=3
3=5
5=7
if 2=7 then exit
Returns:
a=2
while True do b=3
Returns: a b
Shortest code wins.
For stack-based languages, display the highest height of the stack.
For memory cell based languages, display all the memory cells that have been changed.
push 2 items pull 1 item push 2 items pull 3 items
will return 3. Memory-cell: think Brainfuck, and all cell values which have been changed by+
or-
. \$\endgroup\$