Re: [Scheme-reports] **-copy! doesn't specify when start and end is omitted
Per Bothner 12 Nov 2012 06:37 UTC
On 11/11/2012 09:54 AM, Takashi Kato wrote:
> On 11/11/2012 18:24, Arthur A. Gleckler wrote:
>> On Sun, Nov 11, 2012 at 9:06 AM, Takashi Kato <ktakashi@ymail.com
>> <mailto:ktakashi@ymail.com>> wrote:
>>
>> string/vector/bytevector-copy! procedures don't specify when start and
>> end parameters are omitted. I think it is better to mention either it
>> must copy somehow properly or signals an error.
>>
>>
>> Please see the notes under the table on page 7 (section 1.3.3).
> Well, still it doesn't specify which bytevector/string/vector's start
> and end. I couldn't read whether or not this is legal.
>
> (let ((bv (bytevector 1 2 3 4 5)))
> (bytevector-copy! bv 2 #u8(6 7 8 9 10))
> bv))
It sort-of does, in a rather terse way:
"Copies the elements of vector from between start and end
to vector to, starting at at."
So start and end identifiers the elements of from, and at
identifies the index in to where they get copied to.
Perhaps a re-phrasing might help:
The elements of vector 'from' between 'start' and 'end'
(as defined in section 1.3.3) are copied into vector 'to',
starting at index 'at' (replacing elements from 'at'
through 'at+(end-start)').
--
--Per Bothner
per@bothner.com http://per.bothner.com/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports