>While debugging a long sql statement which was kept in a memo and then somewhat macro expanded, I've had to insert a Where clause at an appropriate place, if there was none, or an additional condition if it existed. So I was looking for the last occurrence of the word 'where' or the first occurence of 'from'. I noticed that ratc('where') returned zero in some situations where atc('where') returned the actual position.
>
ATC() does a case-insensitive search; in typically Fox fashion, RATC() does a double-byte search from the end - the converse operation of AT_C(). There is no direct converse of ATC()...