Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: MySQL protocol bug

From: dockimbel:free at: 19-Feb-2004 11:50

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: