Sorting algorithms/Shell sort: Difference between revisions

No edit summary
Line 1,486:
 
=={{header|M2000 Interpreter}}==
{{trans|BBC BASIC}}
 
We use & for passing by reference. Variables with % are integers, and can be any type, a double by default with no decimals, or Decimal, Currency, Long, Integer, Float. When we change value, using operators ++ -- += -= /= *= the final value round to integer using 0.5 where 1.5 give 2. So A%=1/2 give A%=1 and A%=-1/2 give A%=-1. A%=Int(1/2) give A%=0, A%=Int(-1/2) give A%=-1 (int is same as floor() and there is ceil() too, and there is a Bank() for bank type rounding)
 
Anonymous user