% % does the string contain letters and are they all caps % % stack: test-string % length 0 0 rot countup { % % stack: test-string lcase-count ucase-count str-pos % fourth exch 1 mid asc % % stack: test-string lcase-count ucase-count str-char % "char " log)( dup 65 ge second 90 le and { incr2nd } if dup 97 ge second 122 le and { incr3rd } if pop } for % % stack: test-string lcase-count ucase-count % % must have some upper case and no lower case % positive exch zero and pop2nd % % stack: valid-ucase %