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

[REBOL] Re: manipulating values in blocks

From: lmecir:mbox:vol:cz at: 28-Nov-2002 8:44

Hi Hugues,
> > I manage to manipulate a block like [1 17 23 36 49 58], > > representing limits off segments, ie, if i have 6 values in the > > block, it seems that the block contains 5 segments (1-17, 17-23, > > 23-36 ...) > > > > is there anyone who knows how to manipulate the block into > > getting start and end values of each segment ? I've tried, but > > don't know how to do this job.
the most natural way seems to be: block: [1 17 23 36 49 58] foreach [start end] block [ print [start " - " end] ] is that what you wanted? -L