1) // is a start of comment, only functions on that line, there is no terminator. You might try /* */, I haven't, I use // on every line...never really thought about a multiline comment.
2) not equal to... same as != in C
3) see 2
4) your formulas are just keeping a running total of the Items.
The fetches just retrieve and the store adds the amount to the stored value. So storenumbervar(sadf, 0) says to add 0 the number already there.
Never used them, but they are easily updated using shared variables. Look at shared variables, and it should be easy to migrate these functions as well.