Here's the explanation of that loop:


While $d>0
; make taunt while there are words left

; every taunt starts with a '0' which is replaced by the C$[0]
$w = 0

; walk through all the elements of array C$
for $ = 0 to 9

; I need to incorporate a while because for $=5 there are two occurances (explained later)
while instr($w, $)

; take three words of the total count for every occurence of a noun
$d = $d - 3*($=5)

; find the number of the element of C$ in the string
$g = instr($w, $)

; split the element of C$ to singular words
$t = split($c[$],{)

; take the specific word from the C$-line array based on the counter in $S
; ($S has the same dimension as $c and contains the counter for each element of $C)
$h = $t[$s[$]]

; lowercase the noun if it's not at the beginning of the sentence
if $=5 & $g>1 $h=lcase($h) endif

; combine the sentence. I can't do this with a join(split()) because the counter
; has to be updated after every occurence and there can be a double occurence of the noun.
$w = left($w, $g-1) + $h + right($w, -$g)

; add one to the counter
$s[$] = ($s[$]+1) mod (ubound($t)+1)
Loop
next

; Add the taunt to the result.
$a = $a + 'Taunter: ' + $w + '.}'
loop


Does it make sense?
_________________________
The Code is out there