bfb81580698398488c7015eb353ba9f517eb196b
The commands &b, |b, ^b and !b perform the operations and, or, xor and not
using binary arithmetic on integer values.
Please keep in mind, that integer values are 32-bit signed values, so
"echo (!b 1)" returns "-2", of course.
The new command "h0 precision value" is modeled after the existing "l0"
command and returns the given value as string of hexadecimal digits,
padded with leading zeros to a given minimum length ("precision").
Examples:
echo (h0 2 1024) -> "400"
echo (h0 4 1024) -> "0400"
echo (h0 6 1024) -> "000400"
echo (h0 0 (&b 0xe 0x3)) -> "2"
echo (h0 0 (|b 0xe 0x3)) -> "f"
echo (h0 0 (^b 0xe 0x3)) -> "d"
echo (h0 0 (!b 0xe)) -> "fffffff1"
echo (h0 0 (* -1 0xe)) -> "fffffff2" (for comparison)
Also, the commands for addition and multiplication of integer and float
values have been modified to accept more than two arguments.
Examples:
echo (* 3 5) -> "15"
echo (* 3 5 2) -> "30"
echo (* 3 5 2 -1) -> "-30"
echo (* 3) -> "0" (for compatibility reasons)
echo (+ 3 5) -> "8"
echo (+ 3 5 2) -> "10"
echo (+ 3 5 2 -1) -> "9"
echo (+f 3.0 5 1.9 -1) -> "-28.5"
echo (*f 3.0 5 1.9 -1) -> "8.9"
DOCREF + * +f *f &b |b ^b !b h0
…
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="refresh" content="0; url=docs/index.html">
<meta name="description" content="Documentation index of the game AssaultCube @ http://assault.cubers.net/">
<meta name="author" content="Rabid Viper Productions">
<meta name="copyright" content="You may be able to redistribute this content under specific conditions.
Please read the licensing information, available @ http://assault.cubers.net/docs/license.html for the
conditions that would apply to what you may be redistributing.">
<title>AssaultCube Documentation</title>
<style type="text/css">
body
{
background-color: #222222;
}
</style>
</head>
<body>
<div>
</div>
</body>
</html>
Languages
C
57.9%
C++
27.6%
Shell
11.1%
Python
1.2%
Makefile
1%
Other
1.1%