NXC
Version 1.2.1 r5
Main Page
Related Pages
Modules
Data Structures
Files
Examples
All
Data Structures
Files
Functions
Variables
Groups
Pages
ex_ArraySum.nxc
This is an example of how to use the
ArraySum
function.
task main()
{
long
data[40];
for
(
int
i = 0; i < 40; i++)
data[i] =
rand
();
TextOut
(0,
LCD_LINE1
,
"Sum of values = "
);
long
x =
ArraySum
(data,
NA
,
NA
);
// start at 0 and go to length(data);
NumOut
(0,
LCD_LINE2
, x);
Wait
(
SEC_3
);
}
Generated by
1.8.2