/* Generate a password of a given length */ Parse Arg NumChars Do While DataType(NumChars)<>"NUM" Say Say "Enter the number of characters for the password?" Parse Pull NumChars end /* do */ Range.1="0-9" Range.2="a-z" Range.3="A-Z" Range.0=3 k=0 Do i=1 to Range.0 Parse Var Range.i StartC "-" StopC Start=C2D(StartC) Stop=C2D(StopC) Do j=Start to Stop k=k+1 Bag.k=d2c(j) end /* do */ end /* do */ Bag.0=k Passwd="" Do i=1 to NumChars k=Random(1,Bag.0) Passwd=Passwd||Bag.k end /* do */ Say Passwd Exit