It's documentation bug/omission. The STRTRAN() function returns NULL if any of its parameters is NULL.
? STRTRAN(NULL, 'YYY', "NULL")
? STRTRAN('XXX', NULL, "NULL")
? STRTRAN('XXX', 'YYY', NULL)
>Is the following a bug in STRTRAN()? It happens in VFP 7 & 9.
>
>? ISNULL(STRTRAN('XXX', 'YYY', NULL)) && prints .T.
>
>'YYY' doesn't appear in 'XXX', so why is it substituting NULL in the first place? If the expression sought doesn't exist in the expression to be searched, I would expect to have the expression to be searched returned as is, regardless of the replacement expression.
--sb--