summing_20part_20of_20an_20array
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
summing_20part_20of_20an_20array [2018/04/17 19:01] – Added syntax highlighting tbest3112 | summing_20part_20of_20an_20array [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 11: | Line 11: | ||
<code bb4w> | <code bb4w> | ||
DEF FN_SumPartialArray(d(), | DEF FN_SumPartialArray(d(), | ||
- | LOCAL I% | + | LOCAL i%% |
- | | + | |
- | LOCAL ?I%, I%!1, a() | + | LOCAL ?i%%, i%%!1, a() |
- | ?I% = 1 : I%!1 = last%-first%+1 | + | ?i%% = 1 : i%%!1 = last%-first%+1 |
- | | + | |
= SUM(a()) | = SUM(a()) | ||
</ | </ | ||
Line 21: | Line 21: | ||
<code bb4w> | <code bb4w> | ||
DEF FN_SumPartialArray(d(), | DEF FN_SumPartialArray(d(), | ||
- | LOCAL I% | + | LOCAL i%% |
- | | + | |
- | LOCAL ?I%, I%!1, a() | + | LOCAL ?i%%, i%%!1, a() |
ON ERROR LOCAL RESTORE LOCAL : ERROR ERR, REPORT$ | ON ERROR LOCAL RESTORE LOCAL : ERROR ERR, REPORT$ | ||
- | ?I% = 1 : I%!1 = last%-first%+1 | + | ?i%% = 1 : i%%!1 = last%-first%+1 |
- | | + | |
= SUM(a()) | = SUM(a()) | ||
</ | </ |
summing_20part_20of_20an_20array.1523991697.txt.gz · Last modified: 2024/01/05 00:16 (external edit)