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

[REBOL] Re: parse rule for converting hex to decimal

From: compkarori:gmai:l at: 23-Feb-2010 2:18

Hi Gregg In that case, if the data is potentially suspect I would suggest this instead foreach item exclude parse/all text "$," [ "" ] [ append result to-integer debase/base item 16 ] On Tue, Feb 23, 2010 at 6:10 PM, Gregg Irwin <gregg-pointillistic.com> wrote:
> Hi Graham, > > GC> The 'empty? test is also unnecessary as 'foreach already does that test. > > GC> foreach item parse/all text "$," [ > GC> =A0 =A0 =A0append result to-integer debase/base item 16 > GC> ] > > I think Luke was using it to handle the case where a field is empty. > e.g. > > =A0parse/all text "$," > > Without the test, you'll get entries for the empty fields. > > -- Gregg > > -- > To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject. >
-- Graham Chiu http://www.compkarori.co.nz:8090/ Synapse - the use from anywhere EMR.