Hi John, You wrote: >>Hi all, >> >>The following code snip doesn't work. >> >>Even when the variables window in the debugger says that Temp$ = '' the >>routine refuses to go to the zero condition. >> >>I changed the long if line to read if LEN(Temp$) = 0 and this did not >>work either. >>I have met this problem before somewhere, and I can't remember the fix. >> >> >>CLEAR LOCAL >>LOCAL FN HGLPenUp(Temp$,TmpIndx) >> LONG IF Temp$ = "" >> 'zero condition >> XELSE >> 'non zero condition >> END IF >>END FN = TmpIndx >> >>JC Pete replied: >you could change IF Temp$ = "" to IF PEEK(@Temp$) = 0 > >Pete... I suspect this won't solve it either. Have you checked to see whether you truly have a null string? If you do, any of these methods should work. If not, you need a different test or have a problem elsewhere. To check, find Temp$ in the debugger's variable list. Click on it and choose "Hex data" from the pop-up. When Macsbug opens, the first two characters shown will be 00 if it is a null string. Or, if you're a victim of Macsbugophobia, add a PRINT LEN(Temp$) to your code, or just assign a variable: theLen = LEN(Temp$) so you can see it in the dubugger. BTW, when I've encountered this problem, it has usually been because my string was never defined. If Temp$ starts out as a local var, then when you enter the FN it will usually have some random length and contain random (often non-printing) characters unless you use CLEAR LOCAL FN. Good luck, 0"0 =J= a y "