Difference between revisions of "Operator"

From WikiManual
Jump to: navigation, search
(→‎Conditions)
(moved sysvars text to top of page)
 
(28 intermediate revisions by 9 users not shown)
Line 1: Line 1:
−
For some reason the wiki is only displaying the original entry.  I think.  Anyway, if this message shows up at all, bear with me through the techinical difficulties.
+
__NOTOC__
  
−
== Basic Commands ==
+
Operators you're likely to see in [[Robot DNA]]. Data is stored in [[Sysvar]]s.
−
*[[add]]
 
−
*[[sub]]
 
−
*[[mult]]
 
−
*[[div]]
 
−
*[[rnd]]
 
−
*[[*]]
 
−
*[[mod]]
 
−
*[[sgn]]
 
−
*[[abs]]
 
−
*[[dup]]
 
  
−
== Advanced Commands ==
+
<font size = -2>Updated for version 2.46 on 10/26/2013 by Botsareus</font>
−
*[[findang]]
+
==Operators:==
−
*[[finddist]]
 
−
*[[ceil]]
 
−
*[[floor]]
 
−
*[[sqr]]
 
−
*[[pow]]
 
−
*[[pyth]]
 
  
−
== Bitwise Commands ==
+
{| border="0"
 +
|-
 +
|
 +
{{Flow Commands}}
  
−
It'd be helpful if you knew the [[bit basics]].
+
{{Store Commands}}
−
*[[~]] Compliment
 
−
*[[&]] AND
 
−
*[[pipe| |]] OR
 
−
*[[^]] XOR
 
−
*[[valinc | ++]] increment stack value
 
−
*[[valdec | --]] deincrement stack value
 
−
*[[-]] negate stack value
 
−
*[[Shift left | <<]] bit shift left
 
−
*[[Shift right| >>]] bit shift right
 
  
−
== Conditions ==
+
{{Basic Commands}}
−
* [[Greater than|>]]
 
−
* [[Less than|<]]
 
−
*[[=]]
 
−
*[[!=]]
 
−
*[[%=]]
 
−
*[[!%=]]
 
−
*[[~=]]
 
−
*[[!~=]]
 
−
*[[Greatthan equals|>=]]
 
−
*[[Lessthan equals|<=]]
 
  
−
== Logic Operators ==
+
{{Advanced Commands}}
−
*[[and]]
+
||
−
*[[or]]
+
{{Logical Comparison Operators}}
−
*[[xor]]
 
−
*[[not]]
 
  
−
== Store commands ==
+
{{Logic}}
−
*[[store]]
 
−
*[[inc/dec]]
 
  
−
== Flow Commands ==
+
{{Stack Operators}}
−
*[[cond]]
+
 
−
*[[start]]
+
{{Bitwise Command}}
−
*[[else]]
+
|}
−
*[[stop]]
 

Latest revision as of 20:45, 20 February 2014


Operators you're likely to see in Robot DNA. Data is stored in Sysvars.

Updated for version 2.46 on 10/26/2013 by Botsareus

Operators:

Flow Commands:

cond
start else
stop
end

Store Commands:

store
inc dec

The following commands are not supported in versions earlier 2.46:

addstore
substore
multstore
divstore
ceilstore
floorstore
rndstore
sgnstore
abstore
sqrstore
negstore

Basic Commands:

add & sub
mult & div
rnd
*
mod
sgn
abs

Advanced Commands:

angle
dist
ceil
floor
sqr pow
pyth

The following commands are not supported in versions earlier 2.46:

anglecmp
root
logx
sin
cos

Logical Comparison Operators:

> <
>= <=
= !=
%= !%=
~= !~=

Logic:

true
false
and
or
not
xor

Stack Operators:

Integer Stack:

clear

drop

dup

swap

over

Boolean stack:

clearbool

dropbool

dupbool

swapbool

overbool

Debug:

Not supported in versions earlier 2.46:

debugint

debugbool

Bitwise Command:

~ Complement
& AND
| OR
^ XOR
++ increment stack value
-- deincrement stack value
- negate stack value
<< bit shift left
>> bit shift right