Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

SUM

Description

The SUM function sums numeric elements in a dynamic array. It takes the general form:

SUM(expr)

Where:

expr is a dynamic array. Non-numeric sub-values, values and attributes are ignored.

An example of use is as: 

s = CHAR (252)
v = CHAR(253)
a = CHAR(254)
a0 = 1:s:2:v:3:a:4:s:5:v:6:a:7:s:8:v:'NINE'

a1 = SUM (a0)
a2 = SUM(a1)
a3 = SUM(a2)

CRT a0
CRT a1
CRT a2
CRT a3

to display:

12²345²678²NINE
3²39²615²0
61515
36


Go back to jBASE BASIC.

Was this article helpful?