Gargs, I'm going to do something for you that I wish was always done after these things. Here is my code commented. Maybe it will help.


function edts($z)
dim $,$f,$b,$o,$y
$y=$z
while $z ;while there are letters left in $z
$=left($z,1) ;set $=first character
$o=$=a | $=i |$=u ;if $=a,i,o set $o=1 else set $o=0
if $=e | $=o ;if $=e or o
$o=1 ;set $o=1
else ;otherwise
$f=instr($z,$+$)|$f ;if two of the same letter is in $z set $f=1
;or if not, set $f=0, unless $f is already 1
endif
$b=""+$b+$o ;make a new string based on the original, using $o which is either a 1(vowel) or 0(consonant)
$z=right($z,~) ;remove the first character of $z and reset $z to the new value
$edts="<" + $y + "> is "+iif(instr($b,1)>0 & not ($f | instr($b,111) | instr($b,"000")),"","not ") + "acceptable."
;line above checks for other rules:
; if there is a 1 in $b, there is a vowel
; if $f=1 then there was a double character
; if if there is not 111(3 vowels) or 000(3 consonants) in $b, that is true

; loop
endfunction