
────────────────────────────────────────
 SHEERPOWER V011.032.14  │  KEYS · HELP
────────────────────────────────────────
 File   📁 c:\users\misterdan\browser-agent\examples\regression\r_help_symbols_cmds_file.txt
 Saved  ⭐ 0 Starred   🕘 0 History   🔤 40 Abbreviations
Skill levels
  1 - Beginner  new to programming
  2 - Newcomer  new to Sheerpower, not to programming
  3 - Regular   writes Sheerpower often
  4 - Fluent    tables, web handlers and arrays every day
  5 - Expert    knows the language well
skill n  chooses yours (1 to 5) and remembers it
>>> help ==
No help matches ==

>>> help --
No help matches --

>>> help ++
var++

++ adds 1 to anything that holds a number: a variable, an array element (grid(row, col)++), a cluster field (orders->quantity(2)++), a table field, a slice or a whole array. It is a statement of its own: y = x++ does not compile. On a dynamic variable a number goes up by 1 and a string raises a Datatype mismatch exception.

Watch out: there is no -- ; write count -= 1

>>> help -=
count -= 1

x -= e is x = x - (e): subtracts the right side, worked out first as a whole. Compound assignment, as += is; there is no --, so count -= 1 takes 1 away.

>>> help *=
price *= 1 + tax_rate

x *= e is x = x * (e): multiplies by the right side, worked out first as a whole (price *= 1 + tax_rate is price * (1 + tax_rate)). Compound assignment, as += is.

Example:
  dim prices(3)
  fill prices with 12.50, 4.25, 8
  cart_total = 0
  receipt$ = 'Items:'
  for item_no = 1 to 3
    cart_total += prices(item_no)
    receipt$ += ' ' + str$(prices(item_no))
  next item_no
  cart_total *= 1 - 0.10      ! take off 10%
  print receipt$; ' -- total after the discount:'; cart_total
prints:
  Items: 12.5 4.25 8 -- total after the discount: 22.275

>>> 

>>> 