What about this: proc {Encode NumberStr Words PrevIsNum} First Rest Word WList CurrIsNum FoundWord in choice NumberStr = nil Words = nil [] Words = Word|WList {Splitter First Rest NumberStr} choice {Corresp First Word} CurrIsNum = false FoundWord=true [] FoundWord=false end if {Not FoundWord} then % there was no word, use the single digit {Length First 1} % check that we are not following a digit PrevIsNum = false First = Word CurrIsNum = true end {Encode Rest WList CurrIsNum} % Recursive Call end endI hope I didn't screw it up :-)
Oh no yes I did of course, sorry :-( I think that you probably need a sub-search (maybe Space.new suffices).
Cheers, Filip _________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
