Wikia

FiM++ Community Wiki

Changes: And

Edit

Back to page

(formatting, new example!)
(FDS: truth table)
 
Line 6: Line 6:
 
{{See Also/small|Infix notation}}
 
{{See Also/small|Infix notation}}
   
{{codeblock|{{tag|value|boolean}}{{tag|whitespace}}{{code|operator|and}}{{tag|whitespace}}{{tag|value|number}}}}
+
{{codeblock|{{tag|value|Boolean}}{{tag|whitespace}}{{code|operator|and}}{{tag|whitespace}}{{tag|value|Boolean}}}}
  +
  +
== Truth Table ==
  +
{|class="wikitable" style="text-align:center;"
  +
|+2 Inputs
  +
!colspan=2|Inputs
  +
!rowspan=2|Output
  +
|-
  +
!A!!B
  +
|-
  +
|T||T
  +
|T
  +
|-
  +
|T||F
  +
|F
  +
|-
  +
|F||T
  +
|F
  +
|-
  +
|F||F
  +
|F
  +
|}
   
 
=== Example ===
 
=== Example ===

Latest revision as of 01:07, November 20, 2012

The and operator is a boolean operator which returns <literal:true> only if all arguments are true, else returns <literal:false>.

Its token is named AND.

FDS Edit

Icon Info
See Also: Infix notation

Truth Table Edit

2 Inputs
Inputs Output
AB
TT T
TF F
FT F
FF F

Example Edit

If I have no pants and I must scream then: I would scream without pants. That's what I would do.

This loops the next part of code if the variable Applejack is equal to 99 and the variable Spike is equal to 12.

This is equivalent to the following Java code:

if (iHaveNoPants && iMustScream) { screamWithoutPants(); }

See Also Edit


Icon Info
This article is a stub. You can help FiM++ Wiki by expanding it.

Around Wikia's network

Random Wiki