array := array
codeking
Posts: 39
Does the assignment operator (:=) work with arrays.· For example, we have array1 and array2.· Each one has 12 bytes.· If we do array1 := array2, will array 2's data be copied to array1?· If not, how do I do this?
Comments
Instead, I'd use
EDIT: Curse you Mike Green!
EDIT #2: Is it faster to loop by hand? Is longmove faster than bytemove or wordmove?
If the array is word or long aligned, wordmove is faster and longmove is fastest since 2 bytes or 4 bytes are moved with two Hub accesses.
Mike
IF array1 == array2
Then you could write "if compare(@array1,@array2,12)"
Do RD{WORD|LONG} require that they be on their appropriate boundaries? the docs don't say anything about that.
I think he meant that it's faster if the words/longs are properly aligned, but works (though more slowly) if they are not.
Regardless, the docs don't seem to address that issue either.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.