HP3000-L Archives

October 1997, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Roy Brown <[log in to unmask]>
Reply To:
Roy Brown <[log in to unmask]>
Date:
Wed, 22 Oct 1997 16:06:36 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
In article <[log in to unmask]>, MTX MISMgr
<[log in to unmask]> writes
>>
>><<The original posting should probably have said that the selections
>>"could" change from year to year, as it is theoretically possible to
>>randomly select the same employees every year.  This is OK although we
>>need to make sure that the same employee is not selected more than once
>
>Steve,
>
>Although, you could do this many ways, here is how I would do it in
"textchart"
> form... obviously this program will not run as is, and assumes 1000 employees
>
<Snip program>

>(no flames please, I never claimed to be a programmer!)

Not a flame, but your program does not prevent the same employee being
picked twice in the single run. So as you add him/her to file B (line
70) you must also delete him/her from file A before cycling again.

APL, that fine language which makes C look both verbose and
comprehensible, has a DEAL random function (?, I think) which simulates
the sort of randomness you get with a well-shuffled pack of cards; the
cards are dealt in a random order, but each card is only dealt once.
Sounds like what's needed here. Pity HP discontinued the APL board (yes,
it needed hardware support as well as its own keyboard) with, IIRC, the
Series III.....still, 'mourning <- elektra' as we used to say...

APL programmers do it monadically...
--
Roy Brown               Phone : (01684) 291710     Fax : (01684) 291712
Affirm Ltd              Email : [log in to unmask]
The Great Barn, Mill St 'Have nothing on your systems that you do not
TEWKESBURY GL20 5SB (UK) know to be useful, or believe to be beautiful.'

ATOM RSS1 RSS2