Key Pages: [ Rope Home Page | Basics (tutorial) | Language Reference | Download ]
The "ifelse" action executes one block of commands if a specified condition is true, or another block if it's false. The syntax is one of..
condition { true-block } { false-block } ifelse
ifelse( condition { true-block } { false-block } )
For example..
ifelse( $a 29 eq { println( "Twenty nine" ) } { println( "Something else" ) } )
ifelse( $ip_proto 6 eq { yes } { no } )
tcp_source 80 eq { yes } { no } ifelse
The true-block is executed if the condition is a non-zero integer or a non-empty string.
The false-block is executed if the condition is zero, or an empty string.
Lowth.com: [ Home | Rope | P2PWall | LinWiz | cutter | Protector - Free Antivirus software | TapeIO ]