Help Contents / Data Structure Primitives / Constructors / FloatArray

FloatArray size
(FloatArray size origin)
FloatArray anarray
FloatArray alist


outputs a new FloatArray of "size" members (must be a positive integer), each of which is an Float. Array members can be selected with Item and changed with setItem. The first member of the FloatArray is member number 1 unless an "origin" input (must be an integer) is given, in which case the first member of the FloatArray has that number as its index. (Typically 0 is used as the origin if anything.) FloatArrays are printed by PRINT and friends. This primitive also can be used to convert alist, anarray, anintarray or anint16array to FloatArray. It can also be used to clone a floatarray. 

Examples: 

	show FloatArray 3	;{0 0 0} 
	show (FloatArray 3 0)	;{0 0 0}@0 
	show FloatArray {1 2 3}	;{1 2 3} 
	show FloatArray [1 2 3]	;{1 2 3} 
	show FloatArray int16array {1 2 3}	;{1 2 3} 
	show FloatArray {a b c}	;  floatarray doesn't like {a b c} as input 
	show Item 3 FloatArray [1 2 3]		;3 


previous: Int16Array	next: mdarray
