V , 54 , 50 bayt
¬ ~9ñ9É 11|á
ñ2ñ20lá
ñ$18é 9ñ^y|Ehé
Pf xxywk$hP>ñd
Çevrimiçi deneyin!
Normalden farklı olarak, bu program yazdırılamayan karakter içermiyor.
Açıklama:
¬ ~ " Insert the entire printable ASCII range
9ñ ñ " 9 times:
9É " Insert 9 spaces at the beginning of this line
11| " Move to the 11'th column on this line
á<CR> " And append a newline after the 11'th column
Şimdi tampon şuna benziyor:
!
"#
$%
&'
()
*+
,-
./
01
23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
Şimdi ortayı kuruyoruz:
2ñ ñ " Two times:
20l " Move 20 characters to the right (because 'l' == 'right', duh)
á<CR> " Append a newline
Burası biraz tuhaflaştığı yer.
$ " Move to the end of this line
18é " Insert 18 spaces before the last character
9ñ " Repeat the following 9 times:
^ " Move to the first non-whitespace character
y| " Yank all the whitespace before the current character.
" We'll call this the "Leading whitespace register"
E " Move to the end of the current WORD (up to before a space)
h " Move back one character
é<CR> " And insert a newline before the current character
P " Paste the leading whitespace for indentation
f " Move forward to a space
xx " Delete two characters
" (Note how we are inbetween the two bottom branches right now)
yw " Yank everything upto the next branch (all spaces)
" We'll paste this on the line up so that we can yank it again later
" To keep track of how far apart the branches are
k$ " Move up a line and to the end of that line
hP " Move back a character and paste the whitespace we yanked
> " Indent this line by one space
ñ " End the loop
İşte önemli bir not. >Komut aslında bir olduğunu operatör metin üzerinde çalışmak üzere, bir argüman olmadan hiçbir şey yapmaz demektir. Örneğin,
>_ "Indent the current line
>> "Indent the current line
>j "Indent the current and next line
>G "Indent every line
Fakat bu komut bir döngüde olduğundan, bir operatör vermeyerek karakter kaydedebiliriz. Bir döngünün sonunda, herhangi bir operatör beklemede ise, _örtük olarak argüman olarak (geçerli satır) doldurur .
Şimdi bu döngünün biraz garip olduğunu kabul edeceğim ve tüm metnin herhangi bir anda nasıl görünmesi gerektiğini takip etmek zor olabilir. Böylece, N döngülerinden sonra nasıl görüneceğini görmek için bu basit programı kullanabilirsiniz .
9'a ayarlarsanız, kurtulmak için biraz fazladan ek metnimiz olduğunu görebilirsiniz. (Sadece mevcut satır).
Bu yüzden şimdiki satırı ile sileriz dd. Fakat bekle! Operatörlerin bazen örtük bir şekilde doldurulan bir tartışmaya katılması gerektiğini söylemiştim. Argümanlar ayrıca program sonunda örtük olarak doldurulur. Öyle ddya da d_(eşdeğer) yerine, dV'nin _bizleri doldurmasını sağlayabiliriz .