annotate interps/cfunge/cfunge-src/tests/iterate-iterate.b109 @ 7759:b4341511eb47
<fizzie> ` echo -e \'#! /bin/bash\\ncmd="$1"\\nshift\\nf="$*"\\nif [ -z "$f" && "$f" == *\\\\ * ]; then f="${cmd#* }"; cmd="${cmd%% *}"; fi\\nif [ -z "$f" ]; then echo try: \\\\`f command filename; else "$cmd" "$(< "$f")"; fi\' > bin/f
author |
HackBot |
date |
Wed, 04 May 2016 21:35:48 +0000 |
parents |
859f9b4339e6 |
children |
|
rev |
line source |
996
|
1 32kk5 >:#._a, v
|
|
2 v"Correct output is:"a"5 5 5 5 5 5 5 5"<
|
|
3 >:#,_a,@
|
|
4
|
|
5 This tests k on k...
|
|
6 Output should be:
|
|
7 5 5 5 5 5 5 5 5
|
|
8 Correct output is:
|
|
9 5 5 5 5 5 5 5 5
|
|
10
|
|
11 Here is how the stack should look after the different steps, spaces for clarity:
|
|
12 First iteration of inner k: 555
|
|
13 Next itereation where inner k pops a 5: 55
|
|
14 Now it pushed five 5s: 55 55555
|
|
15 Finally the code resumes at the 5: 55 55555 5
|