Interesting bug/feature

Michael audax at wideband.net.au
Mon Jul 7 21:21:20 PDT 2008


You're right, of course.  I hadn't put my thought processes in gear  
enough to realise that what I'd observed was a logical consequence.  I  
can't fathom where Fill B "hello" came from!

michael


On 08/07/2008, at 1:53 PM, James Rea wrote:

>> 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
> ---------------------------------------------------------------------
> _______________________________________________
> Qna mailing list
> Qna at provue.com
> http://provue.com/mailman/listinfo/qna



More information about the Qna mailing list