Reference URL: http://kthx.net/paste/1298 (Pasted 2 years, 9 months ago)

1
2
3
4
5
6
7
8
9
10
11
checkrandom {
  var %line = [[ ]] hello [[ ]] world 
  var %i = 1, %out, %r = $rand(1,2)
  echo -a %r
  while ($gettok(%line,%i,91)) { 
    tokenize 93 $v1 
    %out = %out $iif(%r == %i, [X], [[ ]]) $($+($,$0),2) 
    inc %i
  } 
  echo -a %out
}

Create New Paste | Download