Darwinbots Forum
Bots and Simulations => DNA - General => Topic started by: Panda on May 28, 2010, 05:38:39 AM
-
Erm. No matter how hard I try to do an inline !=, or even think about it, well, I just cannot do it. I need some help please.
-
Erm. No matter how hard I try to do an inline !=, or even think about it, well, I just cannot do it. I need some help please.
you need to work with tables
for example you dont want .Amem totbe 5 and then do something
*.amem -5 add sgn abs 1 sub abs
' 1 -4 -1 1 0 0
' 2 -3 -1 1 0 0
' 5 0 0 0 -1 1
' 7 1 1 1 0 0
>>from here you got valeu 1 to multiply to do something if something equals 5 like 1 x 5 .up store
>> if you want to execute only if it isnt 5 you can do without the last 2 columns (then sgn is the last one)
-
a-a add sgn mult?
-
a-a add sgn mult?
I did *.var -a add sgn abs mult
, I think, I may not be completely correct, though.
And thanks peterb, I didn't ever think of doing it like that .
-
You do know there's a sub command. It subtracts.
-
You do know there's a sub command. It subtracts.
If I understand what you are saying. Then yeah, I know, "-x add" is a subtraction. I could have done "x sub" but I continued doing what the other person was doing.