>>Has anyone ever had the TYPE function error?
>>
>>Here's the situation.....
>>
>>FPD 2.6 on a 486-33 (doesn't need to run on anything faster)
>>
>>We have an error coming up from a UDF on a variable that is calculated from a parameter.
>>
>>Trying to get around (what we thought was) the source of the error, decided to try checking the 'type' of the parameters and make sure they were what we expected them to be, but the line
>>
>>IF type('pStrttime') # 'C'
>>
>>returns an error along the lines of "Variable Not Found"
>>
>>Any ideas??
>Dorris,
>I think it's not the real line of error. An "ON .." routine, deactivate, activate, show etc all might be the real cause. Another thing, I think you didn't forget to write whole error message but quotes. 'Variable "varname" not found' is the expected message and it seems Fox is even not returning a var name.
Oooops. Forgot textmerge delimiters conflict with HTML tags.
ON ERROR DO errhand WITH ;
ERROR(), MESSAGE(), MESSAGE(1), PROGRAM(), LINENO(),lineno(1)
PROCEDURE errhand
PARAMETER merror, mess, mess1, mprog, mlineno, mlineno1
set textmerge on
set textmerge to error.txt noshow
\Error no :!!LTRIM(STR(merror))!!
\Error message :!!mess!!
\Error line 1 :!!LTRIM(STR(mlineno))!!
\Error line 2 :!!LTRIM(STR(mlineno1))!!
\Error module :!!mprog!!
for lnPrg=1 to 255
if empty(program(lnPrg))
EXIT
ENDIF
\ Level !!ltrim(str(lnPrg))!! : !!program(lnPrg)!!
endfor
set textmerge TO
set textmerge oFF
modi comm error.txt nomodi
Cetin