Summing lists in directory structure
|
09-14-2017, 11:17 AM
Post: #1
|
|||
|
|||
Summing lists in directory structure
This one's caused me to scratch my head a bit, to be honest. I wanted to total up the amount we've spent on groceries (so far), so I took each day's amounts and put them all into named lists, like this: { 234.56 12.98 3.99 } 'JUN25' STO
Each month gets its own folder, i.e. JAN FEB MAR, APR ... OCTOB NOV DECEM. When I want to add up the individual lists, I simply recall them one at a time, hit + between each one after the second one, and use ΣLIST when I have the final big list. I created a very short program thus: Code: \<< + ΣLIST 'TOTAL' STO I have a folder structure that looks something like this: Code:
Now I'm wondering how to add together all the TOTALs in each folder to give me a sum at the end? Or better still, how would I use a better program than the one I cobbled together from perusing the User's Guide's List section? I'm sure that if I could run a program in the GROCERIES folder iterating over each month, I could gather the relevant variables together, sum them all, and give myself a total (I did this manually by adding together all the TOTALs) using the program instead. Let me know if you need any further details, as I may not have explained myself very well. Cheers, brickviking (Post 82) Regards, BrickViking HP-50g |Casio fx-9750G+ |Casio fx-9750GII (SH4a) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)