Mike Lewis
Programmer
Here's something that just caught me out.
x = NULL
y = TRANSFORM(x)
What do you suppose y contains?
I assumed that y would be NULL. After all, any expression that includes a NULL will evaluate to NULL.
In fact, y will be a string containing six characters: .NULL.
In retrospect, I suppose it's obvious, but I just spent nearly an hour trying to figure out a bug before it dawned on me. So I thought I'd post it here in case anyone else gets caught by it.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
My Visual FoxPro site: www.ml-consult.co.uk
x = NULL
y = TRANSFORM(x)
What do you suppose y contains?
I assumed that y would be NULL. After all, any expression that includes a NULL will evaluate to NULL.
In fact, y will be a string containing six characters: .NULL.
In retrospect, I suppose it's obvious, but I just spent nearly an hour trying to figure out a bug before it dawned on me. So I thought I'd post it here in case anyone else gets caught by it.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
My Visual FoxPro site: www.ml-consult.co.uk