This version is out of date, covering development from v9.5.0 to v9.7.3. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

^not(condition)^


Export Code Type: 

Export Code Scope of Action: 

Export Code First Added: 

Export Code Last Altered: 

 Conditional Mark-up   [other codes of this type]

 n/a   [codes with similar scope]

 Baseline

 As at baseline


^not(condition)^

If the condition is true, ^not(condition)^ is false. This has limited usage, inside an ^if(condition)^ statement to reverse the boolean result of the test. For example:

^if(^nextSibling^)^Yes^endIf^ 

will insert the text 'Yes' if there is a next, exportable, sibling. To reverse this it is possible to reverse the test and place the insertion in the logical 'else' branch:

^if(^nextSibling^)^^else^Yes^endIf^ 

But use of ^not()^ can give more easily understandable code:

^if(^not(^nextSibling^)^)^Yes^endIf^ 

Note how the code wraps the condition inside the ^if()^.

The ^not()^ code should not be used for negating condition queries written fully in action code syntax. So do not use a mix like:

^if(^not($MyString=="")^)^Yes^endIf^ 

Instead, use:

^if($MyString!="")^Yes^endIf^ 

In summary, this is a niche code that you should not expect to need except with export codes that are fixed boolean assessments and are being used in export code form in a condition argument. Most likely use is with testing ^previousSibling^ and ^nextSibling^ state.