I think this should generate a syntax error...
whatdoeseveryoneelse think?
Bruce Easton
bruce at stn.com
Fri Jan 26 13:00:32 PST 2007
John Esak wrote Fri 1/26/2007 9:14 AM:
> [..]
> wouldn't it be helpful to the
> filePro programmers to know that they have mistakenly assigned to
> a 0 length
> field that can not possibly accept any data?
> [..]
To err or not to err . ..
John, I know you said no need to answer, but I found this very interesting.
On the one hand, I know I would not want filepro bothering me with trying to
write to zero length fields. Sometimes, I do this on purpose, especially
via the copy command for moving records into a similar map that
intentionally has some fields zeroed out. (Explicit "0" in the size field.)
On the other hand, you then wrote:
>> Then, when you assign to field 9, which you *know* you just removed,
>> it does not complain in any way. No syntax error. Yes, I see thatthe
>> fields are still actually there with the colons and all in the map...
>> and they are visible on the F6 screen...
to which Ken replied:
> Yes. You have simply made them zero length with no name.
Here's where my curiosity gets the best of me. If when a map is saved with
a fewer number of visible fields (not with 0 size, but completely blanked
lines), and the operator says yeah, shrink the file when restructuring, why
in the world are those extra lines left in the map and therefore be
considered assignable fields by processing? (The ones that are left with
just colons.)
If one looks at the file via ddir after such an operation reflects the size
that would not include such extra fields. So why would they be kept? I
know this has been like this since "Peggy Sue Got Married," but it seems
like a mis-match to me. So if fields are deleted out of your map, you may
not know it because you won't get any error in your app. But if you are in
control of everything, then you may use this as a convenience to not have to
comment out some assignments.
Bruce Easton
STN, Inc.
More information about the Filepro-list
mailing list