![]() |
Type in a command, or "ls dictionary" to search all commands for "dictionary", etc.
|
NAME ift - Compares two values and returns a value based on the result SYNOPSIS ift (CONDITIONAL STATEMENT)RESULT IF TRUE, RESULT IF FALSE -delimit [DELIMITER] -redirect [REDIRECT] EXAMPLES ift (16<23)yub,nub (This would return "yub" because 16 is less than 23) ift (abcdefg<>abcdefg) yub, nub (This would return "nub" because the two values are equal, thus failing the test) ift (100<=100)http://www.google.com -redirect true (This would redirect to the the Google website.) ift (100<=100)http://www.google.com -redirect false (This would return the Google URL as a string.) DESCRIPTION Compares two values and returns a result depending on the result of the comparison. RESULT IF FALSE, -REDIRECT and -DELIMIT are optional parameters The conditional statement should be formatted like: VALUE1>VALUE2 Possible conditional operators are: > - greater than < - less than >= - greater than or equal <= - less than or equal == - equal to <> - not equal to The '-redirect' parameter can be set to True or False. It defaults to False. If set to True and the result of the command begins with "HTTP" then the the command will attempt to redirect the user to the web site. The '-delimit' parameter can be used to change the value that separates RESULT IF TRUE and RESULT IF FALSE. It defaults to a comma (,). NOTES This command should be functionally identical to 'ifThen'. The only difference is the syntax used. AUTHOR Allen Ormond - aormond (at) gmail (dot) com