06-06-2020, 15:25 +0200
AuthorPost
Winters12-30-2005, 00:02   | random letters
(Guest)
How can i get a random letter from a to z?
CyBex  12-30-2005, 00:16   Jabber  ICQ  AOL IM  Yahoo IM  MSN  Homepage
nie da
(Administrator)

Avatar

Member since 01/2004
260 Posts
Location: Berlin
                                                                                                                              
1
set randomchar [format %c [expr {int(rand()*26)+97}]]


mfG CyBex @ QuakeNet, UnderNet, EFNet, Freenode, euIRC, GameSurge & ShadowWorld - Files
CyBex  12-30-2005, 00:17   Jabber  ICQ  AOL IM  Yahoo IM  MSN  Homepage
nie da
(Administrator)

Avatar

Member since 01/2004
260 Posts
Location: Berlin
                                                                                                                              
1
2
set abc [list a b c d e f g h i j k l m n o p q r s t u v w x y z]
set randomchar [lindex $abc [rand 26]]


mfG CyBex @ QuakeNet, UnderNet, EFNet, Freenode, euIRC, GameSurge & ShadowWorld - Files
Advanced options for this topic:

Ignore this topic (Do not list this topic in the "unread topics" search. You are currently not ignoring this topic.)
Hide this topic (Hidden topics are not displayed in the topics list. This topic is currently not hidden.)
Go to forum

Unclassified NewsBoard 1.5.3-d | © 2003-4 by Yves Goergen | Time: 155 msec, CPU time: 55.5 msec, 33 Database queries in 114.8 msec | 3.2 kB (15.2 kB) | Timezone: +0200