Array Basics
Bojsza
gbojsza at mac.com
Wed Feb 25 10:48:56 EST 2004
I am starting to forage into arrays and have some very basic questions:
1. What is the difference between an array and a matrix?
The following script is to take a 3x1 array and multiply it by a 1x3
array
on mouseUp
put empty into xArray
put empty into zArray
put "1 2 3" into xArray
split xArray by space -- create an array from a list (3x1 array)
put "2 3 4" into zArray -- create a 1x3 array
matrixMultiply(xArray,zArray)
put it into arrayOut
end mouseUp
The script editor errors with the following:
Expression: missing ' ) ' before factor.
2. I know that I can go from a list to an array with the split command.
Can I go from an array to a list also using the split command?
3. Can I create an array with a variable ie a 3x1 array with angle as a
variable?
atan(angle)
cos(angle)
sin(angle)
thanks,
Glen
More information about the use-livecode
mailing list