[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems when RANDOM without $ is used as an array index
From: |
Chet Ramey |
Subject: |
Re: Problems when RANDOM without $ is used as an array index |
Date: |
Mon, 11 Jan 2010 17:42:44 -0500 |
> > Think of it as
> >
> > x = $(( RANDOM%6+1 + RANDOM%6+1 ))
> > y = dice[x]
> > dice[RANDOM%6+1 + RANDOM%6+1] = y + 1
> > return y
> [...]
>
> I would still consider that a bug.
OK. But everyone does it the same way.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Problems when RANDOM without $ is used as an array index, dennis, 2010/01/09
- Re: Problems when RANDOM without $ is used as an array index, Stephane CHAZELAS, 2010/01/11
- Re: Problems when RANDOM without $ is used as an array index, Chet Ramey, 2010/01/11
- Re: Problems when RANDOM without $ is used as an array index, Stephane CHAZELAS, 2010/01/11
- Message not available
- Re: Problems when RANDOM without $ is used as an array index, Stephane CHAZELAS, 2010/01/11
- Re: Problems when RANDOM without $ is used as an array index,
Chet Ramey <=
- Re: Problems when RANDOM without $ is used as an array index, DennisW, 2010/01/11
- Message not available
- Re: Problems when RANDOM without $ is used as an array index, Stephane CHAZELAS, 2010/01/12
- Re: Problems when RANDOM without $ is used as an array index, Chet Ramey, 2010/01/12
- Re: Problems when RANDOM without $ is used as an array index, Stephane CHAZELAS, 2010/01/20
- Message not available
- Re: Problems when RANDOM without $ is used as an array index, DennisW, 2010/01/20