Show Changes Show Changes
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename
Administration Page Administration Page
Search

History

5/15/2008 4:19:30 AM
-66.161.197.130
5/15/2008 4:17:59 AM
-66.161.197.130
5/15/2008 4:15:23 AM
-66.161.197.130
10/7/2007 7:44:47 PM
JohnDavidson-66.78.121.176
9/19/2007 11:13:32 PM
-207.46.92.17
List all versions List all versions

RSS feed for the FlexWiki namespace

Boolean Demo
.

What information is available about a Boolean?

A Boolean type has the following members:

Object Equals(Object obj)
Determine whether this object is equal to another object
Object IfFalse(Block block)
If this object is false, evaluate the block and answer the result of the evaluation; otherwise answer null
Object IfFalseIfTrue(Block falseBlock, Block trueBlock)
If this object is false, evaluate the first block and answer the result; otherwise evaluate the other block and return the result
Object IfTrue(Block block)
If this object is true, evaluate the block and answer the result of the evaluation; otherwise answer null
Object IfTrueIfFalse(Block trueBlock, Block falseBlock)
If this object is true, evaluate the first block and answer the result; otherwise evaluate the other block and return the result
Object Not
Answer the logical reverse of this boolean (true for false; false for true)

Examples

 Topic version: @@topic.Version.IfNull {"'''latest'''"} Else {topic.Version}@@

Topic version: 2008-05-15-04-17-59.2666--66.161.197.130

The sample above is not really a sample of boolean functionality - JohnDavidson

IfTrueIfFalse

 10.GreaterThan(5) = 
        @@10.GreaterThan(5).IfTrueIfFalse({"10 is bigger than 5 is true"},
                {"5 is bigger than 10 is false"})@@

10.GreaterThan(5) = 10 is bigger than 5 is true

 5.GreaterThan(10) = 
        @@5.GreaterThan(10).IfTrueIfFalse({"10 is bigger than 5 is true"},
                {"5 is bigger than 10 is false"})@@

5.GreaterThan(10) = 5 is bigger than 10 is false

IfTrue

 10.GreaterThan(5) = 
        @@10.GreaterThan(5).IfTrue({"10 is bigger than 5 is true"})@@

10.GreaterThan(5) = 10 is bigger than 5 is true

 5.GreaterThan(10) = 
        @@5.GreaterThan(10).IfTrue({"10 is bigger than 5 is true"})@@

5.GreaterThan(10) = null

Equals

 10.Equals(10) = @@10.Equals(10)@@

10.Equals(10) = true

 10.Equals(5) = @@10.Equals(5)@@

10.Equals(5) = false

Not

 10.Equals(10).Not = @@10.Equals(10).Not@@

10.Equals(10).Not = false

 10.Equals(5).Not = @@10.Equals(5).Not@@

10.Equals(5).Not = false

Oops!! Is that a bug? Shouldn't 10.Equals(5).Not = true?

Not logged in. Log in

Welcome to the home of FlexWiki, an experimental collaboration tool, based on WikiWiki.

This is FlexWiki, an open source wiki engine.

This site supports the new NoFollow anti-spam initiative.
Change Style

Recent Topics