Assignments to uncast dummy fields (was Re: simple
Tyler
tyler.style at gmail.com
Fri Feb 15 10:50:29 PST 2008
> Hmmm...how does filePro decide if xx="0" is meant as a string or a
> numeric? It could be either, depending on the context you use it in
> later. What about things like "00019", where you would want to keep
> the leading zero? Wouldn't it make more sense to have all undefined
> variables be of edit * than automagically assigning them an edit type?
If you tried it using the test template Ken provided, you would see that
operations like xx="0" or xx="00019" *do* result in an * edit for xx.
filePro makes no assumptions about literal strings assigned in this
manner, just as seems logical to you.
Only expressions that explicitly perform a math operation, like Ken's
final example, will result in xx receiving a numeric edit type.
But...I am not assigning from a field or variable at all, nor am I
performing any mathematical operation. I am assigning 'r' from
FIELDVAL. Does this mean that FIELDVAL also does a silent casting of
the variable based on the edit of the FIELDVAL field being referenced?
I would have thought the return value of a function would not have an
explicit type.
Tyler
More information about the Filepro-list
mailing list