🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.tech.amiga
Article #533

Re: Arexx Again

#533
From: Terrance Richard Boyes
Date: Mon, 06 Mar 2000 00:00
59 lines
2707 bytes
Stephen Bridges <newsreply@bh01.demon.co.uk> wrote:
> Terrance Richard Boyes in a moment of madness wrote:

>> Perhaps the question could be rephrased, it could currently mean
>> several things ! However you could consider both of
>  
> amount of numbers = a

> /* */

DO y = 1 to a - 1
> DO x = y + 1 to a
>  IF uin.y = uin.x THEN match.y = uin.x 
> END
END

(probably :)

> The first loop checks uin.1 against all the others, the second loop
> checks uin.2 against all the others except uin.1. What I need is for
> these three lines to be inside another loop so that I don't have to do
> this indeffinately, this is where I'm stuck.

> I also need to know which number is a repeat and carry it out of the
> loops.

Just need to define a few more variables as above, NB that you can
use

match.y.x = 'fred'

and such like.

Quite a common piece of code for things like that would be

match.0 = 0

if foo
    maxmatch = match.0 + 1
    match.maxmatch = foo
    match.0 = maxmatch
endif
    
if bar
    maxmatch = match.0 + 1
    match.maxmatch = bar
    match.0 = maxmatch
endif

/* blah */

if match.0 > 0 then
do x = 1 to match.0
    say match.x
end

-- 
<URL:http://www.pierrot.co.uk/>                                  Team AMIGA
Love truth, pardon error.  --Voltaire
Technical Details
Message-ID: <20000306.234340.0AA80202.qAaa@pierrot.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <mC.4C.c62nI4QdY64528955.NR@bh01.demon.co.uk> <20000305.8AE5B18.81C6@nospam.demon.co.uk> <20000305.195739.C2984023.koaa@pierrot.co.uk> <0A.Y0.d62gK7BJwV25wYb45.NR@bh01.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1160fd,370c0c3eb2c4a678
X-Google-Attributes: gid1160fd,public
From: tez@pierrot.co.uk (Terrance Richard Boyes)
Subject: Re: Arexx Again
Date: 2000/03/06
Message-ID: <20000306.234340.0AA80202.qAaa@pierrot.co.uk>
X-Deja-AN: 594059404
X-PGP-Fingerprint: 20 66 0F E8 85 64 9C 2C  6F 82 6F 19 6C 2F 6A 1D
X-Cancel-Lock: TEZT:45b1e40434681b1578ecc5f03516509e ef70ca652f695fe74ef066047a88d938
X-PGP-Keyfile: <URL:http://www.pierrot.co.uk/pgpauth/>
References: <mC.4C.c62nI4QdY64528955.NR@bh01.demon.co.uk> <20000305.8AE5B18.81C6@nospam.demon.co.uk> <20000305.195739.C2984023.koaa@pierrot.co.uk> <0A.Y0.d62gK7BJwV25wYb45.NR@bh01.demon.co.uk>
X-PGP-Auth: pub   512/3A14C4B9 1999/04/22 Tez Boyes <tez@pierrot.co.uk>    iQBVAwUBOMRCsUXush46FMS5AQHtXAH/SOMy47VQqXykfEWY5JgvEK/OOtqoGD5l    covKeGbOshAexkp+dcpXARzLn+wDkQhtFqo8OHysk81FQII8+cD21A==    =uKYP
X-NaMLServ: $VER: v0.9b <tez@pierrot.co.uk>
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!anchor-post-34.mail.demon.net!pierrot.demon.co.uk!pierrot.co.uk!tez@pierrot.co.uk
X-Trace: mail2news.demon.co.uk 952391671 mail2news:8571 mail2news mail2news.demon.co.uk
Organization: ECL.Net
User-Agent: tin/pre-1.4-980618 (AMIGA)
X-Lan-Trace: news.pierrot.lan 20000306.234340 news:qAaa IDENT tez@ami060.pierrot.lan
Newsgroups: demon.tech.amiga