doedit command
Kenneth Brody
kenbrody at spamcop.net
Wed May 2 11:53:32 PDT 2012
On 5/2/2012 2:41 PM, Dan McCabe wrote:
[...]
>> rfdol is defined as [! " " !](zero|lots mycent |<zero>mycent)
>>> mycent is defined as< and> [!.!] num num</100 dollars>
[...]
>> Assuming no typos in transcribing it into your e-mail, your "rfdol" edit
>> is broken. Given a (10,.2) field as input, as your code uses, it will fail
>> for anything less than "100000.00".
>>
>> See if you can find it. (If necessary, compare it to the "cheque" edit.)
>
> Thanks Ken, I was missing the { } around the first part of the edit. I had
> tested the edit before I used it anywhere, and it always returned what I
> wanted (I used several different numbers to test). Only when I tried to
> use real data and doedit did it fail on me, odd. Now everything is working
> as I originally planned.
The reason it "worked" while testing in define edits is because you entered
data without leading spaces, or within processing you used literal values
without leading spaces.
So, this would work:
ta(80,rfdol) = "12345.67"
whereas this would not:
t(10,.2) = "12345.67"
ta(80,rfdol) = t
In short, your tests didn't include "real world" data. :-)
> Thanks to Joe Chasan as well.
--
Kenneth Brody
More information about the Filepro-list
mailing list