randomletter(
CASE
)

The randomletter( function returns a random letter.


Parameters

This function has one parameter:

case – determines the case of the randomly generated character. If this option is "l" or "L" then the letter will be lower case (between a and z). if the option is "u" or "U" then the letter will be upper case (between a and z). if the option is any other value then the result may be either upper or lower case.


Description

This function returns a random letter. Each time you use it a new random letter will be returned.

randomletter("x") ☞ D
randomletter("x") ☞ o
randomletter("x") ☞ W
randomletter("x") ☞ b
randomletter("x") ☞ u

If you want all upper case letters, set the option to "U".

randomletter("U") ☞ D
randomletter("U") ☞ S
randomletter("U") ☞ K
randomletter("U") ☞ B
randomletter("U") ☞ N

If you want all lower case letters, set the option to "L".

randomletter("L") ☞ y
randomletter("L") ☞ a
randomletter("L") ☞ f
randomletter("L") ☞ m
randomletter("L") ☞ q

Note: This function is equivalent to:

?(upper(option)="U",chr(int(65+26*rnd())),?(upper(option)="L",chr(int(97+26*rnd())),
               ?(int(1+2*rnd())=1,chr(int(65+26*rnd())),chr(int(97+26*rnd())))))

History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.