• Abs(a:LONG)(LONG)
    Returns absolute value of <a>.

  • And(a:ULONG,b:ULONG)(ULONG)
    Returns <a>&<b>.

  • BitCount(value:ULONG)(LONG)
    Returns # of bits contained in 32bit <value>.
      BitCount($0f0) returns 4 : $0f0=%0000.1111.0000
      BitCount($124) returns 3 : $124=%0001.0010.0100
    
  • BitSize(value:ULONG)(LONG)
    This returns size of bit field contained in the 32bit <value>
      BitSize($2c) returns 4  : $2c=%0010.1100
                size is this  :        ^^ ^^
      BitSize(5) returns 3    : 5=%101
                size is this  :    ^^^
      BitSize($124) returns 7 : $124=%0001.0010.0100
                size is this  :          ^ ^^^^ ^^
      BitSize(a) equals to HiBit(a)-LoBit(a)
    
  • Bounds(a:LONG,min:LONG,max:LONG)(LONG)
    Bounds <a> with <min> and <max> and returns the result. It is the same as:
      res:=IF a<min THEN min ELSE IF a>max THEN max ELSE a
    
  • EOr(a:ULONG,b:ULONG)(ULONG)
    Returns <a>!<b>.

  • Even(a:LONG)(BOOL)
    Returns -1 if <a> is even else 0.

  • F2I(a:DOUBLE)(LONG)
    Converts the float/double <a> to LONG with rounding.

  • HiBit(value:ULONG)(LONG)
    This returns position of highest active bit of the 32bit <value>

  • InBounds(min:LONG,val:LONG,max:LONG)(BOOL)
    Compares the value with min and max, and returns TRUE if the value fits to the bounds. It's the same as:
      res:=IF min<=val<=max THEN TRUE ELSE FALSE
    
  • LoBit(value:ULONG)(LONG)
    This returns position of lowest active bit of the 32bit <value>

  • Max(a:LONG,b:LONG)(LONG)
    Returns the bigger value of <a> and <b>.

  • Min(a:LONG,b:LONG)(LONG)
    Returns the smaller value of <a> and <b>.

  • Neg(a:LONG)(LONG)
    Returns negated <a>.

  • Not(a:ULONG)(ULONG)
    Returns noted <a>.

  • Odd(a:LONG)(BOOL)
    Returns -1 if <a> is odd else 0.

  • Or(a:ULONG,b:ULONG)(ULONG)
    Returns <a>|<b>.

  • Pow(a:DOUBLE,b:DOUBLE)(DOUBLE)
    Returns <a>^<b>. If <b>=0, 1 is returned.

  • Rol(a:ULONG,b:LONG)(ULONG)
    Returns <a> rotated left by <b> bits.

  • Ror(a:ULONG,b:LONG)(ULONG)
    Returns <a> rotated right by <b> bits.

  • Shl(a:ULONG,b:LONG)(ULONG)
    Returns <a> shifted left by <b> bits.

  • Shr(a:ULONG,b:LONG)(ULONG)
    Returns <a> shifted right by <b> bits.

  • Sign(a:LONG)(LONG)
    Returns 1 if <a>>0 or -1 if <a><0, else 0.