[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] Array
Hello Fellow SQR'ers...
I'm wondering if anyone out there can assist me.
I'm working with an array with two numeric values (#ID & #NBR) in which when
loaded into the array can look like the output below...
*********************
#ID: 001
#NBR: 123456
#ID: 002
#NBR: 987456
#ID: 003
#NBR: 555444
#ID: 001
#NBR: 000111
*********************
As you can see I have two instances of the #ID variable (which is expected). Is
it possible to sum the #NBR variable for both (or however many) instances of
the #ID and pass that total into a new variable? I guess I'm looking for a
FOR-EACH type of a loop or some type of array sort, but I've been unable to
find any documentation to assist in this situation.
BTW....my load array logic is below...
---------------------------------------------------
Begin-Procedure Load-Array
Let #Ctr=0
While #Ctr <= #i - 1
If #Ctr > #i - 1
break
End-If
Get #ID #NBR
From DataArray(#Ctr)
Add 1 to #Ctr
#Debug Show 'ID: '#ID !-- TEST
#Debug Show 'NBR: '#NBR !-- TEST
End-While
Let #ID=0
Let #NBR=0
End-Procedure
---------------------------------------------------
Any assistance would be greatly appreciated.
Thanks,
Darrel
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users