TIP: Click on subject to list as thread! ANSI
echo: quik_bas
to: BRUCE BECK
from: DAVID WILLIAMS
date: 1998-04-17 22:35:00
subject: Re: random letters

-> Yes, but with my setup, the user has more room to customs if he/she
-> wants to. :>
Well, he'll certainly have time for all kinds of activities - coffee
breaks and so on. Your loop will be excecuted a whole lot of times until
it happens to hit on a bunch of numbers in the right range.
Of course, it is possible to dream up all kinds of variations on the
theme. Maybe something like:
RANDOMIZE TIMER
DEF FNR%(X%,Y%) = X% + INT(Y% * RND)
DEF FNC$(X%,Y%) = CHR$(FNR%(X%,Y%))
DIM A%(3,2)
FOR C% = 1 TO 3
   READ A%(C%,1), A%(C%,2)
NEXT
DATA 48,10,65,26,97,26
PW$ = ""
L% = FNR%(6,5)
FOR C% = 1 TO L%
  T% = 1 + (C% MOD 3)
  PW$ = PW$ + FNC$(A%(T%,1),A%(T%,2))
NEXT
PRINT "The password is "; PW$
If I haven't made any silly mistakes, the password will be of randomized
length, between 6 and 10 characters inclusive, and the characters will
cycle among numerical digits, uppercase letters and lowercase letters.
Well, why not?! This is all just an intellectual video game.
                             dow
--- PCBoard (R) v15.3 (OS/2) 5
---------------
* Origin: FidoNet: CAP/CANADA Support BBS : 416 287-0234 (1:250/710)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.