>>What's the best way to EMPTY an array element, regardless of datatype, without messin' with the structure?
>
>I'll assume by EMPTY you mean, make it so EMPTY( foo[ i ] ) = .T.
>
>Not sure what you mean by "the structure":
>
>- if you mean just the array's dimensions, you could just set the element to .F.
>- if you want to replace the element with a blank version of the same datatype, I don't know the answer to that. You could write a little function to do it, or maybe there's an elegant way to do it I'm not aware of.
>
>UPDATE: if you're using VFP9 you could experiment with CAST():
>
>foo[ i ] = CAST( "" AS ( TYPE( "foo[ i ]" ) ) )
>
Hmmm, that's actually much better. Why I didn't think of that?
If it's not broken, fix it until it is.
My Blog