Anonymous user
Bacon cipher: Difference between revisions
→{{header|Lua}}
No edit summary |
|||
Line 537:
=={{header|Lua}}==
Based on C++ version
<lang Lua>
function Bacon( txt, secret, e )
Line 644 ⟶ 645:
end
local a = Bacon( "
"When in doubt, wash jump around on couch, meow constantly until given food, "..
"favor packaging over toy. And sometimes switches in french and say 'miaou' "..
"just because well why not has closed eyes but still sees you lick yarn hanging "..
"out of own butt so pelt
"Fall over dead, not really but gets sypathy", 1 )
print( a )
print( Bacon( "", a, 0 ) )
print( a )
print( Bacon( "", a, 0 ) )
Line 655 ⟶ 658:
{{out}}
<pre>
>lua -e "io.stdout:setvbuf 'no'" "bco.lua"
chAsE the pig ArOUnD tHE HOuSe pRESeNt BeLly, ScrAtch HANd When sTRokEd. when in douBT, WAsH jUMp AroUNd On COUcH, meOW COnStAntlY unTil given fOoD, FaVoR PACkagINg Over toY. AnD soMetIMES sWitcHEs in FreNch AND saY 'mIAoU' jUst BeCAuse wELL Why not Has CLosED EYEs bu
FALL OVER DEAD NOT REALLY BUT GETS SYPATHY
</pre>
=={{header|Perl 6}}==
Not truly a Bacon Cipher as it doesn't encode using font variations. But fits with the spirit if not the exact definition.
|