User:Serpentine Cougar/TestAccumulator

This could go in a Template. See source to understand what it's doing.

[main]

1,[total]
 * main

1,He read a book⚫1⚫ happily.
 * event1

1,He went to school⚫3⚫ eventually.
 * event2

1,He suffered amnesia⚫-2⚫ unfortunately.
 * event3

0,position of first symbol 1,
 * mark1

0,position of second symbol 1,
 * mark2

0,length of substring between the two symbols 1,
 * sublength1

0,get value to be totaled from event1 0, 1,
 * one

0,get value to be totaled from event2 0, 1,
 * two

0,total the values from the two events 0, 1,
 * three

0,replace value between symbols in event1 with the totaled value 0, 0, 1,
 * replace

0,remove value between symbols in event2 0, 1,
 * remove

0,total the values between the symbols in both strings, stick it in the first string, and concatenate the strings together 0,[replace] [remove] 1,
 * total