Old lady swallowed a fly: Difference between revisions
m
syntax highlighting fixup automation
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
|||
Line 13:
{{trans|Python}}
<
(‘fly’, ‘I don't know why she swallowed a fly, perhaps she'll die.’),
(‘spider’, ‘It wiggled and jiggled and tickled inside her.’),
Line 36:
I animal != ‘fly’
print(animals[0][1])
print()</
=={{header|8080 Assembly}}==
<
mvi c,-1 ; C = verse counter
verse: inr c
Line 110:
swlw1: db 'She swallowed the $'
swlw2: db ' to catch the $'
comma: db ',',13,10,'$'</
=={{header|8086 Assembly}}==
<
org 100h
section .text
Line 177:
swlw1: db 'She swallowed the $'
swlw2: db ' to catch the $'
comma: db ',',13,10,'$'</
=={{header|Ada}}==
<
procedure Swallow_Fly is
Line 237:
Put_Line("There was an old lady who swallowed a horse ...");
Put_Line("She's dead, of course!");
end Swallow_Fly;</
=={{header|ALGOL 68}}==
Line 244:
{{works with|ALGOL 68G|Any - tested with release [http://sourceforge.net/projects/algol68/files/algol68g/algol68g-1.18.0/algol68g-1.18.0-9h.tiny.el5.centos.fc11.i386.rpm/download 1.18.0-9h.tiny].}}
{{wont work with|ELLA ALGOL 68|Any (with appropriate job cards) - tested with release [http://sourceforge.net/projects/algol68/files/algol68toc/algol68toc-1.8.8d/algol68toc-1.8-8d.fc9.i386.rpm/download 1.8-8d] - due to extensive use of '''format'''[ted] ''transput''.}}
<
STRING sw=" swallow ",swd=sw[:UPB sw-1]+"ed ", tsa=". To"+sw+"a";
Line 277:
vs("Cow",("I don't know how",tsa));
vs("Donkey",("It was rather wonky",tsa));
vs("Horse","She's dead, of course!")</
===Using a dictionary===
Line 283:
{{works with|ALGOL 68G|Any - tested with release [http://sourceforge.net/projects/algol68/files/algol68g/algol68g-1.18.0/algol68g-1.18.0-9h.tiny.el5.centos.fc11.i386.rpm/download 1.18.0-9h.tiny].}}
{{wont work with|ELLA ALGOL 68|Any (with appropriate job cards) - tested with release [http://sourceforge.net/projects/algol68/files/algol68toc/algol68toc-1.8.8d/algol68toc-1.8-8d.fc9.i386.rpm/download 1.8-8d] - due to extensive use of '''format'''[ted] ''transput''.}}
<
STRING a="WBXAY",b="WCXBY",c="WDXCY",d="WEXDY",
Line 321:
OD;
print(new line)
OD</
=={{header|APL}}==
{{works with|Dyalog APL}}
<
N←⎕TC[3]
a←'fly' 'spider' 'bird' 'cat' 'dog' 'goat' 'cow' 'horse'
Line 344:
}¨⌽1↓⍳⍵
}¨⍳8
}</
=={{header|ARM Assembly}}==
<syntaxhighlight lang="text">.global _start
_start: eor r8,r8,r8 @ Verse counter
verse: add r8,r8,#1 @ Next verse
Line 414:
swa1: .asciz "She swallowed the "
swa2: .asciz " to catch the "
comma: .asciz ",\n" </
=={{header|AutoHotkey}}==
{{works with|AutoHotkey 1.1}}
<
, ["spider", "That wriggled and jiggled and tickled inside her"]
, ["bird", "Quite absurd"]
Line 436:
}
MsgBox, % Output</
=={{header|AWK}}==
<syntaxhighlight lang="awk">
# syntax: GAWK -f OLD_LADY_SWALLOWED_A_FLY.AWK
BEGIN {
Line 473:
exit(0)
}
</syntaxhighlight>
=={{header|Babel}}==
<
(fly
Line 520:
("spider" "That wriggled and jiggled and tickled inside her")
("fly" " "))))
</syntaxhighlight>
=={{header|Batch File}}==
<
setlocal enabledelayedexpansion
Line 568:
)
:done
pause>nul&exit/b 0</
=={{header|BBC BASIC}}==
This prints the lyrics from the Wikipedia page, more or less. I don't know anything about goats and donkeys and the like.
<
DIM swallowings$(6, 1)
swallowings$() = "fly", "+why", "spider", "That wriggled and wiggled and tickled inside her", "bird", ":How absurd", "cat", ":Fancy that", "dog", ":What a hog", "cow", "+how", "horse", "She's dead, of course"
Line 599:
PRINT observation$; "!"
ENDCASE
ENDPROC</
=={{header|BCPL}}==
<
let animal(n) =
Line 631:
$)
let start() be for n=0 to 7 do verse(n)</
=={{header|Befunge}}==
We start with a collection of reusable phrases stored as a linked list. We then build up the sequence of indices into that list necessary to produce the song (this step is largely programmatic, because of the repetitive nature, although some of the verses require special case handling). Finally we iterate over the indices and print out the associated phrases.
<
>-#2:#\8#1`#:|#-1:-1\7_^#`g00:+<>\#%"O"/#::$#<3#$+g48*-v^\,+*+ 55!:*!!-"|":g+3<
>$ 36 26 58 49 81 36 26 10 \1-:#^\_^#:-1\+<00_@#:>#<$<
Line 644:
.|Fancy that$Dog-.|What a hog$Pig7.|Her mouth was so big%Goat=.|She just opened
her throat$Cow3.|I don't know how'Donkey6.|It was rather wonky&Horse:.|She's d
ead, of course!|</
=={{header|C}}==
<
static char const *animals[] = {
"fly",
Line 682:
}
}
}</
=={{header|C sharp|C#}}==
<
namespace OldLady
Line 725:
}
}
}</
=={{header|C++}}==
{{trans|C#}}
<
const char *CREATURES[] = { "fly", "spider", "bird", "cat", "dog", "goat", "cow", "horse" };
Line 756:
return 0;
}</
{{out}}
<pre>There was an old lady who swallowed a fly
Line 817:
=={{header|CLU}}==
<
rep = null
Line 857:
start_up = proc ()
old_lady$swallow(stream$primary_output())
end start_up</
=={{header|COBOL}}==
<
PROGRAM-ID. OLD-LADY.
Line 950:
DISPLAY LINE-OUT.
</syntaxhighlight>
=={{header|Commodore BASIC}}==
Line 958:
===Commodore BASIC (No Sound)===
<
1 rem rosetta code
2 rem old lady who swallowed a fly
Line 992:
1070 data "cow","I don't know how she swallowed a cow!"
1080 data "horse","...She died, of course!"
</syntaxhighlight>
===Commodore 64===
Sound must be played to the Commodore 64 SID chip through direct register access, therefore, the sound table is two-dimensional to account for the high byte and low byte of the appropriate frequencies.
<
1 rem rosetta code
2 rem old lady who swallowed a fly - c64
Line 1,063:
2550 for i=1 to 8:for j=1 to 3:read mu$(i,j):next j:next i
2599 return
</syntaxhighlight>
===Commodore Plus/4===
BASIC 3.5 on the Commodore Plus/4 at least features the SOUND command which simplifies getting the sound processor to play notes, however, a "tuned" sound table still needs to be defined with the appropriate frequencies.
<
1 rem rosetta code
2 rem old lady who swallowed a fly - plus/4
Line 1,135:
2550 for i=1 to 8:for j=1 to 3:read mu$(i,j):next j:next i
2599 return
</syntaxhighlight>
===Commodore 128===
BASIC 7.0 on the Commodore 128 features a robust PLAY command which will interpret strings of macro commands for commanding the SID processor. This all but eliminates the bulk of the note playing routines. Note the data statements are slightly different as the macros for note duration are different. The 128 uses '''i''', '''q''', and '''h''' for ''eighth'', ''quarter'', and ''half'' notes respectively, while the 64 and Plus/4 examples were coded to use '''8''', '''4''', and '''2''' as it was simpler to use for math operations, rather than an additional look-up table.
<
1 rem rosetta code
2 rem old lady who swallowed a fly - c128
Line 1,191:
2520 play "v1o4t0u5"
2599 return
</syntaxhighlight>
=={{header|Common Lisp}}==
A rather iterative, rather than recursive solution. The lyrics match the original Burl Ives recording (not the later animated cartoon):
<
(defun what (verse) (first verse))
(defun remark (verse) (second verse))
Line 1,232:
(if (always v)
(format t "~a~a~%" (if (= j 0) "But " "") (remark v))))))
(format t "Perhaps she'll die. ~%~%"))))))</
{{Out}}
Line 1,263:
=={{header|Cowgol}}==
<
var animals: [uint8][] := {
Line 1,303:
i := i + 1;
end loop;</
=={{header|D}}==
{{trans|C}}
<
immutable data = [
Line 1,335:
void main() {
data[0].oldLady;
}</
A more structured alternative version:
<
immutable struct T {
Line 1,378:
"Perhaps she'll die.\n".writeln;
}
}</
=={{header|Draco}}==
<
case n
incase 0: "fly"
Line 1,425:
byte n;
for n from 0 upto 7 do verse(n) od
corp</
=={{header|Elena}}==
ELENA 5.0 :
<
const Creatures = new string[]{"fly", "spider", "bird", "cat", "dog", "goat", "cow", "horse"};
Line 1,464:
console.writeLine()
}
}</
=={{header|Elixir}}==
{{trans|Ruby}}
<
@descriptions [
fly: "I don't know why S",
Line 1,515:
end
Old_lady.swallowed</
=={{header|Factor}}==
Windows users should put zlib1.dll[http://downloads.factorcode.org/dlls/] to factor folder.
<
"c%1E4%WlIU5WMphn^P`UexSD=s^-?Jk$NVE7-Gs=fQ9_`T}Y~ggi4hvMSb{SX}vpQXJ;^Yqok7%xd(0
Line 1,528:
<}rUt#FCDtKB9S`Y4jg+0PuB?Qt-&(11p?caq^S=1C`$D1fa<y6|YD*77a{4949T_-MVet;6abaEn"
base85> 3215 <compressed> uncompress >string print</
=={{header|Forth}}==
swallow-addr is obviously a good candidate for an object, but Forth has many OO candidates - we won't settle that argument here.
<
dup c, here swap dup allot move ;
Line 1,585:
first @ begin dup verse cr >next dup 0= until drop
cr ." There was an old lady who swallowed a horse..."
cr ." She's dead, of course!" ;</
=={{header|Fortran}}==
<syntaxhighlight lang="fortran">
program fly
!A program to print the "Old lady swallowed a fly" poem
Line 1,627:
end program fly
</syntaxhighlight>
=={{header|FreeBASIC}}==
<
{ "fly", "I don't know why she swallowed a fly - Perhaps she'll die!" },_
{ "spider", "That wriggled and jiggled and tickled inside her!" },_
Line 1,652:
next countdown
print
next verse</
=={{header|Free Pascal}}==
<
in Rosetta Code. It formats the lyrics like the Wikipedia one *)
program OldLady;
Line 1,735:
PrintSong;
end.
</syntaxhighlight>
=={{header|Frege}}==
Line 1,743:
Nearly identical to the Haskell. Only the first line of the program is different.
<
import Data.List
Line 1,783:
song = concatMap verse $ tail $ reverse $ tails animals
main = putStr $ unlines song</
=={{header|Go}}==
[https://play.golang.org/p/OV3YJSWxaJP Go Playground]
<
import "fmt"
Line 1,824:
fmt.Println(animals[0][lyric] + "\n")
}
}</
=={{header|Haskell}}==
<
animals :: [String]
Line 1,856:
putStr $
concatMap unlines $
zipWith (:) beginnings $ reverse $ ([] :) (tails lastVerse)</
{{out}}<pre>There was an old lady who swallowed a fly.
I don't know why she swallowed a fly.
Line 1,923:
And a variation on this theme (a little more disaggregated):
<
import Data.Map.Strict (Map, fromList, lookup)
import Data.List (inits, intercalate)
Line 1,984:
comments :: Map String String
comments = fromList courses</
{{Out}}
<pre>There was an old lady who swallowed a fly;
Line 2,050:
=={{header|Icon}} and {{header|Unicon}}==
This version isn't as compressed as some of the others but it is very straightforward to modify. Just add a new long and terse verse entry and amend the line marked order. This uses a feature of Icon/Unicon that allows procedures to be called with a list datatype instead of an argument list, so we just pre-build argument lists for printf.
<
verse := table() # arglists for printf - [1] long asides and [2] terse joiners
Line 2,081:
end
link printf</
Sample output omitted.
Line 2,089:
=={{header|J}}==
This defines T to be the required text.
<
e=:3 :'T=:T,y,LF'
E=:e@,&'.'
Line 2,112:
'Donkey'N'It was rather wonky'
O'Horse'
e'She''s dead, of course!'</
=={{header|Java}}==
{{Trans|C| via [[#D|D]]}}
<
final static String[] data = {
Line 2,144:
oldLady(data[0], false);
}
}</
=={{header|Julia}}==
{{works with|Julia|0.6}}
<
b64 = b"""eNrtVE1rwzAMvedXaKdeRn7ENrb21rHCzmrs1m49K9gOJv9+cko/HBcGg0LHcpOfnq2np0QL
Line 2,158:
Mz3XkPBc/TSN3yxGiqMiipHRekycK0ZwMhM8jerGC9zuZaoTho3kMKSfJjLaF8v8wLzmXMqM
zJvGew/jnZPzclA08yAkikegDTTUMfzwDXBcwoE="""
println(String(transcode(ZlibDecompressor(), base64decode(b64))))</
<
("fly", "I don't know why she swallowed a fly, perhaps she'll die."),
("spider", "It wiggled and jiggled and tickled inside her."),
Line 2,181:
if animal != "fly" println(animals[1][2]) end # fly lyric
println() # new line
end</
=={{header|Kotlin}}==
<
val animals = listOf("fly", "spider", "bird", "cat","dog", "goat", "cow", "horse")
Line 2,218:
fun main(args: Array<String>) {
sing()
}</
=={{header|Lambdatalk}}==
<
{def A {A.new fly spider bird cat dog goat cow horse}}
-> A
Line 2,295:
There was an old lady who swallowed a horse
She's dead of course
</syntaxhighlight>
=={{header|Liberty BASIC}}==
<syntaxhighlight lang="lb">
'[RC] Old lady swallowed a fly
'http://rosettacode.org/wiki/Old_lady_swallowed_a_fly
Line 2,344:
end
</syntaxhighlight>
=={{header|Logo}}==
<
; animal inc comment
[fly 2 [I don't know why she swallowed that fly]]
Line 2,381:
]
bye</
=={{header|Lua}}==
<
phrases = {
"",
Line 2,413:
end
io.write("I don't know why she swallowed a fly - Perhaps she'll die!\n\n")
end</
=={{header|MAD}}==
<
INTERNAL FUNCTION(V)
Line 2,458:
VERSE WHENEVER J.LE.2, VERSE.(J-1)
END OF PROGRAM </
=={{header|Maple}}==
<
phrases := ["I don't know why she swallowed a fly, perhaps she'll die!",
"That wriggled and wiggled and tiggled inside her.",
Line 2,479:
printf("\n");
end if;
end do;</
{{out}}
<pre>
Line 2,525:
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<
"horse"};
notes = {"", "That wiggled and jiggled and tickled inside her.\n",
Line 2,541:
StringJoin @@ ("She swallowed the " <> animals[[#]] <>
" to catch the " <> animals[[# - 1]] <> ".\n" & /@
Range[#, 2, -1]) <> notes[[9]]] & /@ Range[8])];</
{{out}}
<pre>There was an old lady who swallowed a fly.
Line 2,602:
=={{header|Mercury}}==
<
:- interface.
:- import_module io.
Line 2,674:
main(!IO) :-
swallowed(fly, !IO).</
=={{header|Modula-2}}==
<
FROM FormatString IMPORT FormatString;
FROM Terminal IMPORT WriteString,WriteLn,ReadChar;
Line 2,728:
ReadChar
END OldLady.</
=={{header|Nanoquery}}==
{{trans|Ursa}}
<
creatures = {"fly", "spider", "bird", "cat", "dog", "goat", "cow", "horse"}
comments = {"I don't know why she swallowed that fly.\nPerhaps she'll die\n",\
Line 2,755:
end
input()</
=={{header|Nim}}==
{{trans|Python}}
{{libheader|nim-lang/zip}}
<
const b64 = """
Line 2,771:
zJvGew/jnZPzclA08yAkikegDTTUMfzwDXBcwoE="""
echo b64.decode.uncompress()</
=={{header|OCaml}}==
===Using a dictionary===
Only one minimalist line of code (the last line):
<
"I know an old lady who swallowed a "; "fly"; ".\n";
"I don't know why she swallowed the fly.\nPerhaps she'll die.\n\n";
Line 2,807:
[23] ;;
List.iter (fun i -> print_string d.(i)) s</
===Using dictionary based decompression===
{{trans|D}}
Here we use the function <code ocaml>String.fold_left</code> [http://ocaml-extlib.googlecode.com/svn/doc/apiref/ExtString.String.html#VALfold_left 1] which is not available in the standard library but in the [http://code.google.com/p/ocaml-extlib/ extlib]:
<
"_ha _c _e _p,\nQuite absurd_f_p;_`cat,\nFancy that_fcat;_j`dog,\nWhat a hog_\
fdog;_l`pig,\nHer mouth_qso big_fpig;_d_r,\nShe just opened her throat_f_r;_i\
Line 2,829:
let _ =
old_lady dict.(0) false</
===Using Logic===
<
[| "fly"; "spider"; "bird"; "cat"; "dog"; "pig"; "goat"; "cow"; "donkey" |]
Line 2,862:
for i = 0 to 8 do f i done;
p "There was an old lady who swallowed a horse...\n\
She's dead, of course!"</
=={{header|Perl}}==
Using string subst:<
"fly",
"spider/That wriggled and jiggled and tickled inside her.\n",
Line 2,896:
s/:.*/--\nShe's dead, of course!\n/s;
print;
}</
Using compression:
(Assumes a Unix-like OS and the availability of the uudecode and bunzip2 utilities).
<
print OUT <DATA> and
close OUT;
Line 2,916:
FeXUOI8486Wvor1zajqPDfpwnrn2jOzvo8hkOPrpVajlwnjqPfIry5c0TbKL
559fx8xqpsquRaFYV9I9fT6p7RrI/Gv/F3JFOFCQRJtf/Q==
====</
=={{header|Phix}}==
{{Trans|Ada}}
<!--<
<span style="color: #008080;">with</span> <span style="color: #008080;">javascript_semantics</span>
<span style="color: #004080;">sequence</span> <span style="color: #000000;">lines</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">{</span><span style="color: #008000;">"Perhaps she'll die!\n"</span><span style="color: #0000FF;">},</span> <span style="color: #000000;">animals</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">{}</span>
Line 2,949:
<span style="color: #0000FF;">{</span><span style="color: #008000;">"cow"</span><span style="color: #0000FF;">,</span> <span style="color: #008000;">"I don't know how"</span><span style="color: #0000FF;">},{</span><span style="color: #008000;">"donkey"</span><span style="color: #0000FF;">,</span> <span style="color: #008000;">"It was rather wonky"</span><span style="color: #0000FF;">}})</span>
<span style="color: #7060A8;">printf</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span> <span style="color: #008000;">"There was an old lady who swallowed a horse ...\nShe's dead, of course!"</span><span style="color: #0000FF;">)</span>
<!--</
=={{header|PHP}}==
<
$swallowed = array(
Line 2,991:
else
print "Perhaps she'll die." . "\n\n";
}</
=={{header|PicoLisp}}==
{{trans|C}}
<
`(chop
"_ha _c _e _p,/Quite absurd_f_p;_`cat,/Fancy that_fcat;_j`dog,\
Line 3,036:
Flg )
(oldLady (car *Dict))</
=={{header|PL/M}}==
<
/* CP/M CALL */
Line 3,101:
CALL BDOS(0,0);
EOF</
=={{header|PowerShell}}==
<
$lines = @(
'fly/'
Line 3,136:
"Perhaps she'll die."
""
}</
=={{header|Python}}==
<
b64 = b'''
Line 3,149:
Mz3XkPBc/TSN3yxGiqMiipHRekycK0ZwMhM8jerGC9zuZaoTho3kMKSfJjLaF8v8wLzmXMqM
zJvGew/jnZPzclA08yAkikegDTTUMfzwDXBcwoE='''
print(zlib.decompress(base64.b64decode(b64)).decode("utf-8", "strict"))</
<
("fly", "I don't know why she swallowed a fly, perhaps she'll die."),
("spider", "It wiggled and jiggled and tickled inside her."),
Line 3,170:
if animal != "fly": print(animals[0][1]) # fly lyric
print() # new line</
=={{header|R}}==
<
c("fly", "I don't know why she swallowed a fly, perhaps she'll die."),
c("spider", "It wiggled and jiggled and tickled inside her."),
Line 3,205:
oldladysnack <- oldladysnack + 1
}
</syntaxhighlight>
=={{header|Racket}}==
<
#lang at-exp racket
Line 3,233:
@line{}
(loop more (cons animal seen)))])))
</syntaxhighlight>
Alternative solution:
<
#lang s-exp framework/private/decode
7VK7TsQwEOz9FcM1AcncZyCoQaLey/piCyuObJ+s/D3rXHj4lIIKgaCItJkZ7cyOfM0uTZ5m
Line 3,242:
U+SaYuVXditxxdu8b338rOvEUas7GvuVa44Tcuu2/qz7CHuu6PeWwGHQ6rmiBCtz24KwWy0I
3KZdqvwDbfWhXPhY+S59RLX5dkTapF66/2/3fYMNMZklVJfAhlgjHKW2k8B7tbtRrw==
</syntaxhighlight>
=={{header|Raku}}==
(formerly Perl 6)
<syntaxhighlight lang="raku"
fly => " I don't know why S—",
spider => " That wriggled and jiggled and tickled inside her.",
Line 3,270:
@history.unshift($_) if @history < 5;
@history.unshift("X to catch the $victim,");
}</
And that's how I larned it!
=={{header|REXX}}==
<
sw= 79 /*the width of the terminal screen, -1.*/
@.=; @.1 = "I don't know why she swallowed a fly,"
Line 3,297:
say center(@.1, sw)
say center("I guess she'll die.", sw)
end /*j*/ /*stick a fork in it, we're all done. */</
{{out|output|text= (with the lyrics being centered):}}
<pre>
Line 3,365:
=={{header|Ruby}}==
<
:fly => "I don't know why S",
:spider => "That wriggled and jiggled and tickled inside her.",
Line 3,396:
print "Perhaps she'll die.\n\n"
end</
=={{header|Rust}}==
[https://play.rust-lang.org/?gist=294c9e29f206d7c8d8028aa5e7002d9a&version=nightly Rust Playground]
<
use Action::*;
Line 3,431:
println!("Perhaps she'll die.\n");
}
}</
=={{header|Scala}}==
<
val verses = List(
Line 3,460:
println
}
}</
{{out}}
<pre>There was an old lady who swallowed a fly,
Line 3,489:
=={{header|Seed7}}==
<
const array array string: verses is [] (
Line 3,522:
end if;
end for;
end func;</
=={{header|Sidef}}==
{{trans|Raku}}
<
:fly: " I don't know why S—",
:spider: " That wriggled and jiggled and tickled inside her.",
Line 3,553:
history.len < 5 && history.unshift(verse);
history.unshift("X to catch the #{victim},");
};</
=={{header|Tcl}}==
Because the song is highly repetitive, it compresses wonderfully.
<
puts [zlib inflate [binary decode base64 "
Line 3,568:
nCtGcDITPI3qxgvc7mWqE4aN5DCknyYy2hfL/MC85lzKjMybxnsP452T83JQNPMg
JIpHoA001DH88A0=
"]]</
=={{header|TXR}}==
Line 3,581:
Note one detail: in the first verse we have "... don't know why she swallowed the fly". But in subsequent verses it is
"that fly" not "the fly". So we do a lookup on the fly also to substitute the appropriate line, and in the fly case we skip the original line (see the first <code>@(maybe)</code>).
<
("IK" "I know an old lady who swallowed a") ("SW" "She swallowed the")
("SS" "she swallowed") ("CA" "to catch the") ("XX" "Perhaps she'll die")
Line 3,663:
@song
@ (end)
@(end)</
=={{header|UNIX Shell}}==
{{works_with|Bash}}
<
comments=("I don't know why she swallowed that fly"
"That wriggled and jiggled and tickled inside her"
Line 3,695:
echo
fi
done</
=={{header|Ursa}}==
{{trans|C#}}
<
append "She swallowed the " " to catch the " reason
append "fly" "spider" "bird" "cat" "dog" "goat" "cow" "horse" creatures
Line 3,724:
end for
end for
in string console</
=={{header|VBScript}}==
<syntaxhighlight lang="vb">
a=array( _
array("fly",""),_
Line 3,758:
print b1
next
</syntaxhighlight>
=={{header|Vlang}}==
<
name = 0
lyric = 1
Line 3,791:
println("${animals[0][lyric]}\n")
}
}</
{{out}}
Line 3,849:
=={{header|Wren}}==
{{trans|Kotlin}}
<
var phrases = [
Line 3,879:
}
sing.call()</
=={{header|Z80 Assembly}}==
Line 3,885:
Press any key to print each verse. After the last verse, press any key to return to BASIC.
<
PrintChar equ &BB5A
Line 4,054:
byte " to catch the ",0
Song_NewLine:
byte 13,10,0 ;control codes for a new line.</
=={{header|zkl}}==
{{trans|Tcl}}
Uncompresses the base64 encoded gziped text of the song. Uses shared libraries zlib and msg hashing for the codecs.
<
text:=
"eJztlE1uwyAQhdflFOOVNyhXyLap1FV7AWKIoaFMBFjIt++M7YVpLfVHilQp2cHMg3l8T+IA"
Line 4,069:
MsgHash.base64decode(text) :
ZLib.Inflator().write(_).close().read().text.println();</
{{out}}
<pre>
|