Password generator: Difference between revisions

m
→‎{{header|REXX}}: added support for on-line documentation (help) for the REXX program.
m (added another set of hard-to-discern characters.)
m (→‎{{header|REXX}}: added support for on-line documentation (help) for the REXX program.)
Line 80:
@spec= '!"#$%&()+,-./:;<=>?@[]^{|}~' || "'" /*define a bunch of special characters.*/
parse arg L N seed . /*obtain optional arguments from the CL*/
if L=='?' then call help /*does user want documentation shown? */
if L=='' | L=="," then L=8 /*Not specified? Then use the default.*/
if N=='' | N=="," then N=1 /* " " " " " " */
Line 111 ⟶ 112:
letterU: return substr(@abcU, random(1, length(@abcU)), 1) /* " " uppercase.*/
numeral: return substr(@digs, random(1, length(@digs)), 1) /* " " numeral. */
special: return substr(@spec, random(1, length(@spec)), 1) /* " " special char*/</lang>
/*──────────────────────────────────────────────────────────────────────────────────────*/
help: signal .; .: do j=sigL+2 to sourceline()-1; say sourceline(j); end; exit 0
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~ documentation begins on next line.~~~~~~~~~~~~~~~~~~~~~~~~~
╔═════════════════════════════════════════════════════════════════════════════╗
║ Documentation for the GENPW program: ║
║ ║
║ The format of the GENPW command is: ║
║ ║
║ ║
║ ║
║ GENPW ? ◄─── shows this documentation. ║
║ GENPW ◄─── generates 1 password. ║
║ GENPW length ◄─── generates (all) passwords with this length. ║
║ GENPW length howMany ◄─── generates howMany passwords. ║
║ GENPW , howMany ◄─── uses the default for the length of the PWs.║
║ ║
║ ║
╟─── where: ║
║ length is the length of the passwords to be generated. ║
║ The default is 8. ║
║ If a comma (,) is specified, the default is used. ║
║ The minimum is 4, the maximum is 80. ║
║ ║
║ howMany is the number of passwords to be generated. ║
║ The default is 1. ║
╚═════════════════════════════════════════════════════════════════════════════╝
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~documentation ends on the previous line.~~~~~~~~~~~~~~~~~~~*/</lang>
'''output''' &nbsp; when using the inputs of: &nbsp; <tt> 10 &nbsp; 20 </tt>
<pre>