Scratchpad r75 (See the current copy)
My [Friends] Random [Demonstrations] Random [Diatribes] Feel free to contact me about this website at mailto:wiki@rkeene.org Information about [Threads] Information about [Random Number Generation] Information about [Roy Keene] My [Scratchpad] Information about [Tcl] Random [Links] Random [Scripts] ---- Information about interesting [Current Projects] '''What you will find here''' ** [Test Script 1] **
set ret [list] foreach line [split [getpage 0] \n] {
set ret [linsert $ret [expr int(rand() * [llength $ret])] $line]
}
puts ""
while 1 {
set pageId [expr int(rand() * [countpages])]
set pageText [getpage $pageId]
if {$pageText == ""} {
continue
}
puts "** \[[gettitle $pageId]\] **"
puts $pageText
break}
return