[EMAIL PROTECTED] wrote:
>Hi, I have a request for feature (RFF) concerning 'copy and/or 'pick.
>It would be nice to be able to use one of the following to extract a
>series of binary values from an other binary series:
>
>pick/range series start end
>copy/range series start end
>
>Where 'start and 'end are numeric absolute positional values. Of
>course with the use of negative numbers relative positions would be
>possible too:
>
>copy/range series start -end
>
>Will get the values between 'start and 'start+'end.

Until this gets added, you can use this pattern to get the
same effect in your code:

dest: insert/part (make binary! len) (at src start) len

where start and len are numeric offsets, or:

len: (length? start) - (length? end)
dest: insert/part (make binary! len) start end

where start and end are series positions. Both versions do
direct source-to-dest copying, making them as efficient as
your suggestions.

Brian Hawley

Reply via email to