Thanks, Mark. You know, I actually kinda like BASIC and don't find it ugly at all @;-)
Or, at least I didn't back in my C-64 days, hacking whatever ascii-art adventure game I was playing at the time. Judy http://revined.blogspot.com On Thu, Dec 11, 2008 at 5:47 PM, Mark Schonewille < [email protected]> wrote: > Hi Judy, > > A few very simple examples. Revolution is clearly much more readable and > easier to work with for starting programmers than other languages. > > # revolution > on foo > repeat with x = 32 to 255 > put x & " " & numToChar(x) & cr after msg > end repeat > end foo > > This one is hardly readable if you're not used to reading programing code: > > # php > <?php > for ($chrNr=32;$chrNr < 255;$chrNr++) > { > echo $chrNr." ".chr($chrNr)."\n"; > } > ?> > > Just for fun, here's the AppleScript version. Quite similar to Revolution, > but much more picky. > > -- applescript > on foo() > set myList to "" > repeat with x from 32 to 255 > set myList to myList & x & " " & (ASCII character x) & > return > end repeat > return myList > end foo > > Btw, if you want ugly code, this one should not be omitted... > > 0 REM BASIC > 10 LET x = 31 > 20 LET X = X + 1 > 30 PRINT x," ",CHR$(x) > 40 IF x < 255 GOTO 20 > 50 END > > I've tested all the examples above. They all work. > > Of course, there is a large collection of programming languages already and > people can easily pick the one that looks easy at < > http://99-bottles-of-beer.net/language-runtime-revolution-499.html>. > > -- > Best regards, > > Mark Schonewille > > Economy-x-Talk Consulting and Software Engineering > http://economy-x-talk.com > http://www.salery.biz > Dutch forum: http://runrev.info/rrforum > > We are always looking for new projects! Feel free to contact us to discuss > your custom software project! > > On 11 dec 2008, at 18:52, Judy Perry wrote: > > I again come hat-in-hand to ask for some really ugly-looking code examples >> in those "real world" programming languages to compare with Rev for the >> Slashdot thread. >> Posters there are actually recommending things like Assembly(!), Java, & >> C#! >> <shudders> >> >> Specifically the OP was looking to teach basics such as conditionals, >> variables & loops. >> >> Does anyone have any ugly examples? >> >> Judy >> http://revined.blogspot.com >> >> > _______________________________________________ > use-revolution mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
