COPYing DATA into zero-length array
Root / SmileBASIC Bug Reports / [.]
MZ952Created:
COPY Destination array [,destination offset], "@Label string" [,Number of copy data items] (<-2/2)
Oh wait, the manual states: "... data items will be read according to the number of elements in the copy destination array."
Okay, so, the "array" in this case is the list of data items proceeding DATA. "Array" might be a typo, idk, this is under the second tab of the COPY manual page, under Number of copy data items.
Gotta be a typo (unless DATA is somehow treated like an array?). Anyway, if you omit the parameter, then it copies LEN(ARY[]) items. Still an error imo because if the length is zero, it should copy zero elements rather than throw an error.
If you specify 0 in the optional parameter, it does not error. So,
DIM A[0] COPY A,@0,LEN(A) @0 DATA 1to be on the safe side.