RosettaCode

Scott Rossi scott at tactilemedia.com
Mon Jul 8 00:24:25 EDT 2013


Hi Geoff:

I tried to follow your instructions but can't figure out where/how to submit
a solution.
Went to the 99 Bottles task but don't see LiveCode or Revolution listed in
the available languages.
So I'll post my function here, wait for you to rip it apart and explain how
a regex solution would be 10x more efficient, and say do with it what you
will  :-)

function beerMe

   put "XX bottles of beer on the wall" into verseA

   put "Take one down, pass it around" into verseB

   repeat with N = 99 down to 1

      put replaceText(verseA,"XX",N) & cr & word 1 to 4 of
replaceText(verseA,"XX",N) & cr & verseB & cr & replaceText(verseA,"XX",N-1)
& cr & cr after theSong

   end repeat

   return theSong

end beerMe



Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design



On 7/7/13 7:50 PM, "Geoff Canyon" <gcanyon at gmail.com> wrote:

> Well, I moved the Revolution information to
> http://rosettacode.org/wiki/LiveCode, rewrote some of it for accuracy, put
> in a redirect on the revolution page to the livecode page, and added a
> handful of solutions. Anyone is welcome to contribute -- the page of tasks
> not yet implemented is at:
> http://rosettacode.org/wiki/Reports:Tasks_not_implemented_in_LiveCode
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 





More information about the use-livecode mailing list