This is part of the HicEst documentation
SUM: Sum of an Array or String Argument
Sum of all elements in an entire array, or sum of the ASCII values of all characters in a string. More versatile is the inline-loop construct.
⇾Home
⇾Contents
⇾more Numerics
⇾ Examples
return the sum of all the elements in an entire array
result = SUM( array )
e.g.
REAL
:: array(3, 4)
array = 3^
$
3
9
27
81
243
729
2187
6561
19683
59049
177147
531441
sum = SUM( array )
797160
sum = +( array )
! alternative is
InlineLoop
797160
return the sum of the ASCII values of all characters in a string
result = SUM( string )
e.g.
result
sum = SUM("Hello World")
1052
sum = +(
ICHAR
("Hello World") )
! alternative is
InlineLoop
1052
⇾
Support HicEst
⇾
Impressum
©2000-2019 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.