Assignments to uncast dummy fields (was Re: simple comparison failing)

Kenneth Brody kenbrody at bestweb.net
Fri Feb 15 09:29:07 PST 2008


Quoting Barry Wiseman (Fri, 15 Feb 2008 12:11:07 -0500):

> Tyler wrote:
>
>> 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.

... or assign from a numeric field, as in:

    aa(10,.3) = "1.234"
    r = aa

Assigning to an uncast dummy field will cause that field to be the same
length/type as the value assigned to it.  As you said, string literals
are of type "*".

-- 
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list