Bots and Simulations > DNA - General

If - Elseif - Else

<< < (3/3)

Shasta:

--- Quote from: Prsn828 ---How exactly do you "Just use the boolean stack" ?
I have yet to see anyone explain this.
--- End quote ---
By just using the stack I mean not using a Cond, or Else statement, just placing true and false on the stack through conditions and manipulating it to get the desired code to run. It allows for nested if-elseif-else statements much easier, without using the crazy condition-less code.

I have given an example of it in this very tread here. I also *think* I explained it fairly well here. Also, I may actually get around to putting up a tutorial on the wiki this weekend. Maybe.

Shasta:

--- Quote from: Shasta ---Also, I may actually get around to putting up a tutorial on the wiki this weekend. Maybe.
--- End quote ---
I did get around to this: Inline Conditions Tutorial. If someone could double check it that would be great, also is there anything confusing or left out?

Prsn828:

--- Quote from: Shasta ---
--- Quote from: Shasta ---Also, I may actually get around to putting up a tutorial on the wiki this weekend. Maybe.
--- End quote ---
I did get around to this: Inline Conditions Tutorial. If someone could double check it that would be great, also is there anything confusing or left out?

--- End quote ---

Excellent explanation!

Before this I had no idea that there was a use for the bool stack, lol.
This tutorial is definitely a keeper.

Moonfisher:
Didn't realy read it thoroughly, but had a quick look and couldn't see any errors...
Also for using else if statements I tryed to write a good example in this topic :

http://www.darwinbots.com/Forum/index.php?...p;#entry1379944

Not well explained... I think it should work though, and it covers any "obstacles" I could think of...
May not be the best solution or anything, but might show if there was something you could have missed.

Navigation

[0] Message Index

[*] Previous page

Go to full version