Interesting bug/feature
James Rea
jim at provue.com
Mon Jul 7 20:53:03 PDT 2008
> Preliminary testing suggests that, in a procedure, a Select command
> which selects an empty set will invalidate all subsequent field-
> related commands (until a non-empty set is selected) but will allow
> Print (and perhaps other) commands.
>
> For example,
>
> SelectA = "" ; where A has no null values
> Fill B "hello"
> Print ""
>
> will not fill field B but will print the database. If, however,
> SelectAll is inserted after the first line, all is well. I know that
> it is poor programming to omit the SelectAll command but it is
> possible to do so and, more importantly, its omission can generate a
> quite baffling error. It appears that an empty result of a select
> command has the effect of the rest of the procedure operating on an
> empty database.
This is a feature and has been documented from day one. Surely in the
example you list above you don't want the result to be that field B in
every record is filled with "hello"? Now that would be a serious bug
that would destroy data left and right.
If you want to be more explicit about it you can do this:
select A=""
if info("empty")=false()
field B
fill "hello
endif
print ""
By the way, your original example
Fill B "hello"
won't work in any case, it must be
Field B
fill "hello"
Jim Rea
President, ProVUE Development
---------------------------------------------------------------------
--- Celebrating 30 years of software excellence (1978-2008) ---
---------------------------------------------------------------------
ProVUE Development (714) 841-7779
18685-A Main Street PMB356 http://www.provue.com/
Huntington Beach, CA 92648 Panorama: Turn information into knowledge
---------------------------------------------------------------------
More information about the Qna
mailing list