Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculating in a scan...endscan
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Calculating in a scan...endscan
Miscellaneous
Thread ID:
01158457
Message ID:
01158457
Views:
76
Hi All,

i've below records on my cursor

rcno debit credit remainder
==== ===== ====== =========
1 0 100 0
2 0 200 0
3 100 0 0
4 200 0 0

i'want to calculate and replace for remainder field for the first record

0 - 100 = -100

then

2nd and others shoulbe

* first remainder value + debit - credit

2nd -100 + 0 - 200 = -300 )
3rd -300 + 100 - 0 = -200
4th -200 + 200 - 0 = 0

how can i do this in a scan..endscan or for next loop ?

TIA
Next
Reply
Map
View

Click here to load this message in the networking platform