DNS services
Andy Armstrong
andy at hexten.net
Tue May 23 12:15:27 BST 2006
On 23 May 2006, at 11:55, Matt S Trout wrote:
> Awww, and I was going to see if I could get it running on my
> Archimedes.
http://hexten.net/assets/65Perl02.tar.gz
It works :)
voodoo:~/Works/6502/65Perl02 [12:07] andy$ ./65Perl02.pl
>LOAD "Sort"
>L.
10 count% = 0
20 READ D$
30 IF D$ <> "." THEN count% = count% + 1 : GOTO 20
40 RESTORE
50 DIM data$(count%-1)
60 FOR D% = 0 TO count%-1
70 READ data$(D%)
80 NEXT
90 FOR I% = 0 TO count%-2
100 FOR J% = I% + 1 TO count% - 1
110 IF data$(I%) > data$(J%) THEN t$ = data$(I%) : data$(I%)
= data$(J%) : data$(J%) = t$
120 NEXT
130 NEXT
140 FOR D% = 0 TO count%-1
150 PRINT data$(D%)
160 NEXT
170 DATA Prunes, Raisins, Oranges, Apples, Pears, Peaches, Bananas
180 DATA Melons, Plums
190 DATA .
>RUN
Apples
Bananas
Melons
Oranges
Peaches
Pears
Plums
Prunes
Raisins
>
> Agh, m4, my eyes, MY EYES! (yes, I prefer editing sendmail.cf
> myself. Must have been hit in the head by a walrus as a kid or
> something)
It's the only thing I've ever used M4 for and it was ages ago so I
can't recall if I enjoyed the experience or not. I did once come
across a guy who was absolutely obsessed with m4 - he wouldn't just
write anything, always 'meta-wrote' it using m4. For example a text
file that, say, contained the same email address twice would for him
be an m4 script that parameterised the email and a Makefile to build
the output text file.
--
Andy Armstrong, hexten.net
More information about the london.pm
mailing list