Hi,

Sorry for this annoying little bug. You can fix it easily by adding
        
s: none

in the main context, just after the following comment :

;------ Data reading ------

BTW, it's funny to see how our personal coding style can evolve. While 
looking at the piece of code you've exposed to show the problem, I was 
thinking how would I wrote that today. In case, this can be useful for 
someone :

Old code:

read-field: [
     (null-flag: false)
     read-length s: (either null-flag [field: none]
         [field: sys-copy/part s len s: skip s len]) :s
]

New code (how I would write it today):

read-field: [
     (null-flag: false)
     read-length copy field len skip
     (if null-flag [field: none])
]

It's untested, but looks much better, don't you think ? :-)

-DocKimbel.


Hallvard Ystad wrote:
> Dixit Ingo Hohmann (23.51 18.02.2004):
> 
> 
>>Hi Hallvard,
>>
>>I haven't seen this exact error before, but some that have been alike ... 
>>my guess is that somehow s gets set somewhere else in [...]. Did you try to
>>
>>  protect 's
>>
>>directly after setting it? If you still get the same error, there must be 
>>a bug in now/time/precise
> 
> 
> Ah, you're right, of course! I didn't think that could be it, because the only thing 
> I do in [...] is this:
>   insert db ["ANALYZE TABLE reburls"] 
>   insert db ["ANALYZE TABLE checklist"] 
> (with DocKimbel's mysql protocol). Now with protect 's, here's what I get:
> ** Script Error: Word s is protected, cannot modify
> ** Where: read-columns-headers
> ** Near: parse/all/case read-packet port [
>     read-field (col/table: field)
>     read-field (col/name: field)
>     read-nbytes (col/length: len)
>     read-nbytes (col/type: decode/type len)
>     read-field (
>         col/flags: decode/flags to integer! field/1
>         col/decimals: to integer! field/2
>     )
> ]
> 
> And here's 'read-field:
>   read-field: [
>     (null-flag: false)
>     read-length s: (either null-flag [field: none]
>       [field: sys-copy/part s len s: skip s len]) :s
>   ]
> 
> 
> I should have thought about this yesterday, when I was very puzzled to find out that 
> the problem disappeared when I renamed 's to 'analyze!
> 
> Problem solved. Or at least given to someone else (Doc?). Thanks, Ingo.
> HY
> 
> Pr�tera censeo Carthaginem esse delendam
> 
> 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to