<?show =0?x(1)=^(^var)?^(2)hello>
|
AND multiple tests (both must be true).
|
<?show =^(?="a","a"|?="a","b")?^(1)hello>
|
OR multiple tests (either can be true).
|
<?show =5?^var^>
|
If var is equal to 5.
|
<?show =^(?+^(^var1(x(1))),^(^array(x(1))))?^(1)hello>
|
If TRUE that ^var(1) is greater than ^array(1)
|
<?show =^(?+^var1,1)?^(1)>
|
var1 is greater than the number 1.
|
<?show =^(?+^var1,^var2)?^(1)>
|
var1 is greater than var2
|
<?show =^(?+^(^var1),^(^var2))?^(1)>
|
var1 is greater than var2
|
<?show ?+^(^varA),^(^varB)>
|
If varA is 'greater' than varB.
|
<?show ?=^(^varA),^(^varB)>
|
If varA is 'equal' to varB
|
<?show ?-^(^varA),^(^varB)>
|
If varA is 'less' than varB
|
<?show ?+-^(^varA),^(^varB)>
|
If varA is 'not equal' to varB
|
<?show ?+=^(^varA),^(^varB)>
|
If varA is 'greater than or equal' to varB
|
<?show ?-=^(^varA),^(^varB)>
|
If varA is 'less than or equal' to varB
|
<?show =^(?=^var,"hello")?^(1)>
|
The variable var matches the word 'hello'.
|
<?show =^(?=^var,"hello")?^(1)=^(?+^(^var1),^(^var2))?^(1)>
|
Both are TRUE.
|
<?show =^(?=^"stream1","hello")?^(1)>
|
stream1 matches the word 'hello'.
|
<?show =^(?=^"stream1","")?^(1)>
|
stream1 is empty.
|
<?show =^(?=^"stream1",^"stream2")?^(1)>
|
stream1 matches stream2.
|
<?show =^(?=^"stream1",^var)?^(1)>
|
stream1 matches var
|
<?show =^(?=^(((10+5)*10)/2),75)?^(1)>
|
The expression matches 75.
|
<?show =^(?=#^var2,"1..10i")?^(1)>
|
var2 is a number between 1 and 10.
|
<?show +0?^(?/^var3,"[1-5]")>
|
If var contains a number between 1 to 5 anywhere. Note: the character position is returned.
|
<?show +0?^(?/^var4,"[^a-zA-Z]")>
|
var4 contains anything other than just letters.
|
<?show +0?^(?/^var,"h.llo")>
|
var contains 5 characters and the second character could be anything.
|
<?show +0?^(?/^var,"^h.*o")>
|
var starts with 'h' contains zero or more characters followed by the letter 'o'.
|
<?show +0?^(?/^var,"^h.*o$")>
|
var starts with a 'h' contains zero or more characters and ends with the letter 'o'.
|
<?show "^var1"abc> <?show "^var2"123abcxyz>
<?show +0?^(?/^var2,^var1)hello>
|
Search for the contents of ^var1 within ^var2.
|
INCORRECT <?show +0?^(?/@^var,"^<TAG>[0-9]")hello>
CORRECT <?show "^regex"^$60#TAG$62#\[0\-9]>
CORRECT <?show +0?^(?/@^check_num,^regex)hello>
|
Case sensitive search. If true that the U/C element <TAG> followed by a number was at the start of ^var the output 'hello'. Note: It is not possible to search directly for TAG, you must pass this to another variable and then search within that new variable.
|
<?show +0?^(?/^__#(1),"m")hello>
|
Does indexed attribute (1) contain an 'm'.
|
<?show $^(?/^__#(1),"m")>
|
Show the position of the first 'm' in indexed attribute (1).
|
<?show $^(?/^__#(1),"[0-9]")>
|
As above but looking for a number.
|
<?show =^(?=@"a","a")?^(1)>
|
Both characters are the same case.
|
<?show =^(?="A","a")?^(1)>
|
Both characters are the same with case sensitive turned off (converted to lowercase).
|
<?show =^(?+@"b","a")?^(1)>
|
'b' has a higher value (ISO) than a 'a'.
|
<?show =^(?=@"apple","Apple")?^(0)>
|
The two words are not the same case.
|
<?show =^(?=@^var,^var5)?^(0)>
|
The contents of the vars is not the same case.
|
<?show =^(?=^var,^attribute#)?^(1)>
|
The variable ^var and the attribute are the same.
|
<?show =^(?=^attribute#,"hello")?^(1)>
|
The attribute and the word 'hello' are the same.
|
<?show =^(?=^attribute#,^"stream1")?^(1)>
|
The attribute and stream1 are the same.
|
<?show =^(?=^var3,^(?=^var1,^var2))?^(1)hello>
|
Compare ^var1 and ^var2 and returns 1 or 0 then compare this against ^var3
|
<?showifdef "id" hello>
|
If the attribute id is defined, then output 'hello'.
|
<?showifdef "id=bold"hello>
|
If the attribute was present, and = bold.
|
<?showifdef "id*=c*"hello>
|
If attribute was present and its value begin with a 'c' or 'C'.
|
<?showifdef "id@*=c*"hello>
|
If attribute was present, and its value begin with a U/C 'C'.
|
<?showifdef !"font" goodbye
|
If attribute was not present.
|
<?showifdef !"font=bold"goodbye
|
If attribute was present, but not equal to 'bold'.
|
<showifdef !"id/=(appendix*)|(section*)" hello>
|
Regular expression - if 'id' was not defined as "appendix" or "appendix1" or "appendix2" or "section" or "section1" or "section2".
|
<showifdef !"id/@=(appendix*)|(section*)" hello>
|
Case sensitive version of above.
|
<?showifdef "id#=1..5i" hello>
|
Was id between 1 and 5.
|
<?showifnum "id" hello>
|
If attribute starts with a number.
|
<showifnum !"id"goodbye>
|
If attribute does not start with a number.
|
<tag ID=10,12> or <tag ID,10,12>
|
<?showifdef "ID" $62#?th==$^ID#(1)pt$62#>
<?showifdef "ID" $62#?tlb==$^ID#(2)pt$62#>
|
<style ID=10,12>
|
<?showifdef "_ _(1)" $62#?th==$^_ _#(1)pt$62#>
<?showifdef "_ _(2)" $62#?tlb==$^_ _#(2)pt$62#>
|
<name=10,12 col=red,1>
|
<?showifdef "_ _(1)" $62#?th==$^_ _#(1)pt$62#>
<?showifdef "_ _(2)" $62#?tlb==$^_ _#(2)pt$62#>
<?showifdef "col" $62#?tic==$^col#(1)$62#>
<?showifdef "col" $62#?tul==$^col#(2)$62#>
|
<?th?12pt=10pt>
|
If current point size is 12pt then change to 10pt.
|
<?tic?red=blue>
|
If the current text colour is red, then change the text to be coloured blue.
|
<?tf?"times"="times-b">
|
If the current font is times, then change it to times bold.
|
<^?tlb=^(^line#-v21620)pt>
|
Processing instruction for leading using "variable substitution" which will give the line spacing which is the result of the expression (value of the attribute "line" minus the getvar for "baseline position").
|
<?bk [?tic=red]>......paragraph text here.....<?ek>
|
If the two commands are not on the same line then an instruction can be issued at the <?bk> position. e.g reduce point size until text fits on a single line.
|