Difference between revisions of "Operator"

From WikiManual
Jump to: navigation, search
m (Conditions)
m
Line 1: Line 1:
Anything you're likely to see in DNA.
+
Anything you're likely to see in [[Robot DNA]].
  
=== Sysvars ===
+
==Operators:==
* [[Definitions]]
 
* [[.up|Movement (.up, .dn. .dx, .sx)]]
 
* [[.aimdx|Basic Turning (.aimdx, .aimsx)]]
 
* [[Shooting]]
 
* [[Reproducing]]
 
* [[Ties]]
 
** [[Soft Ties]]
 
** [[Hard Ties]]
 
*** [[MB Sharing]]
 
* [[Memloc and Memval]]
 
* [[In and Out]]
 
* [[Sysvars]] -- Work in progress
 
  
== Basic Commands ==
+
{| border="0"
*[[add]] & [[sub]]
+
|-
*[[mult]] & [[div]]
+
|
*[[rnd]]
+
{{Flow Commands}}
*[[*]]
 
*[[mod]]
 
*[[sgn]]
 
*[[abs]]
 
*[[dup]]
 
*[[inc/dec|inc]] & [[inc/dec|dec]]
 
*[[angle]]
 
  
== Advanced Commands ==
+
{{Store Commands}}
*[[angle]]
 
*[[dist]]
 
*[[ceil]]
 
*[[floor]]
 
*[[sqr]]
 
*[[pow]]
 
*[[pyth]]
 
  
== Bitwise Commands ==
+
{{Basic Commands}}
  
It'd be helpful if you knew the [[bit basics]].
+
{{Advanced Commands}}
*[[~]] Compliment
+
||
*[[&]] AND
+
<div class="boilerplate metadata" id="sfd-c" style="margin: 0 5%; padding: 0 7px 7px 7px; background:#7985c4; border: 1px solid #aaa; text-align: left; font-size:95%;">
*[[pipe| |]] OR
+
{| border="0" style=background:#7985c4;
*[[^]] XOR
+
|-
*[[valinc | ++]] increment stack value
+
===[[Sysvars]]:===
*[[valdec | --]] deincrement stack value
+
:[[Movement]]
*[[-]] negate stack value
+
:[[Shooting]]
*[[Shift left | <<]] bit shift left
+
:[[Reproducing]]
*[[Shift right| >>]] bit shift right
+
:...
 +
|}
 +
</div>
  
 
{{Logical Comparison Operators}}
 
{{Logical Comparison Operators}}
  
== Logic Operators ==
+
{{Logic Operators}}
*[[and]]
 
*[[or]]
 
*[[xor]]
 
*[[not]]
 
  
== Store commands ==
+
{{Bitwise Commands}}
*[[store]]
+
|}
*[[inc/dec]]
 
 
 
=== Flow Commands===
 
* [[cond]]
 
* [[start]]
 
* [[else]]
 
* [[stop]]
 
* [[end]]
 
**[[Robot DNA]]
 

Revision as of 15:23, 23 December 2005

Anything you're likely to see in Robot DNA.

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:

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

Template:Logic Operators

Template:Bitwise Commands