> > Now all we need is an APL version, and perhaps one or
> > two obscure assembler versions. VAX assembler anyone?
> > Cray assembler maybe?
>> Dammit, but I tried to stop myself...
Here's the INTERCAL version. Someone just had to do it.
It's a little long because I don't have the time at the moment to make it
shorter -- the pub beckons. The casual reader will also notice that I've
cheated a little and used the INTERCAL standard library.
However, the program does work (for suitably small input values).
If you're using it, please remember that INTERCAL doesn't like decimal, but
only understands upper-case typed digits in English or a couple of other
rather obscure languages, including Sanskrit and Basque. It also returns
the values in roman numerals.
Nick
----
PLEASE WRITE IN .5
DO .2 <- #1
DO .6 <- #1
PLEASE COME FROM (4)
DO (1) NEXT
PLEASE STASH .2
DO .1 <- .5
DO .2 <- .6
DO (1039) NEXT
DO .6 <- .3
DO RETRIEVE .2
DO (1010) NEXT
DO .5 <- .3
(4) DON'T GIVE UP
(1) DO (2) NEXT
PLEASE FORGET #1
(3) DO READ OUT .6
(2) PLEASE DON'T GIVE UP
PLEASE STASH .2
DO .2 <- #1
DO .1 <- .5
DO (1000) NEXT
DO RETRIEVE .2
DO .1 <- '.1~.1'~#1
DO (1020) NEXT
DO RESUME .1
DO COME FROM (3)
DO GIVE UP
--
Irish Linux Users' Group: ilug at linux.iehttp://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
List maintainer: listmaster at linux.ie
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!