George,


'Vertical' summation can be achieved by using vector OCONVS with a G
conversion. eg to sum the 2nd value from an attribute delimited dynamic
array : SUM(OCONVS(Z,'G1':@VM:1))



example:

Z = ''

FOR I = 1 TO 9; FOR J = 1 TO 5

Z<I,J> = RND(99)

NEXT ; NEXT



CRT Z

CRT SUM(OCONVS(Z,'G1':@VM:1))



nb. It would seem logical to use FIELDS() function rather than use the G
conversion but - heh - FIELDS(), despite the documentation, doesn't work
using @VM as the separator.



Cheers,

--

Stuart



-----Original Message-----

From: "George Gallen"

Subject: RE: [U2] sum vs looping



What is needed is a VSUM() command, or vertical sum.



Say X=VSUM(YDATA,2) and it will add up all the numbers

vertically that are in of the dynamic array.



George




















































































































































































































































































































































































































































































































































































































































































































































































































































**********************************************************************
This email message and any files transmitted with it are confidential
and intended solely for the use of addressed recipient(s). If you have 
received this email in error please notify the Spotless IS Support Centre (61 3 
9269 7555) immediately who will advise further action.

This footnote also confirms that this email message has been scanned
for the presence of computer viruses.
**********************************************************************
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to