11.07.2015 Views

NetEx EFT213 Reference Manual Rel 5.4

NetEx EFT213 Reference Manual Rel 5.4

NetEx EFT213 Reference Manual Rel 5.4

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CMP FunctionThe CMP function compares two strings. It allows for partial string match by specifying the required charactersin upper case.Format:Where:stringkeyif_trueif_falseExamples:cmp(string, key, if_true [, if_false])a string expression whose letters are compared with the argument key.a string expression defining the letters required for partial string match. Upper case lettersdefine the minimum required spelling. Key is used to validate the argument string.a string expression whose value the function takes if the test is successful.an optional string expression whose value the function takes if the test fails. If this argumentis omitted, the function takes on the value of a null string.Ask the user for a Yes/No response, and compare the reply with the key “Yes”. Require the user to type atleast “Y”:eFT> ask -prompt “Yes/No? ” replyeFT: Yes/No? yeFT> text {cmp(reply,"Yes","YES","NO")}eFT: YESAsk the user for a Yes/No response, and compare the reply with the key “YES”. Force the user to type theentire word “YES”:eFT> ask -prompt "YES/No? " replyeFT: YES/No? yeseFT> text {cmp(reply,"YES","YES,"NO")}eFT: YESIn order to not compare to the key, do the same commands, but reply to the prompt with text that doesn’t meetthe minimum spelling requirements:eFT> ask -prompt “YES/No? ” replyeFT: YES/No? yeFT> text {cmp(reply,"YES","YES","NO")}eFT: NOREF-eFT213-R<strong>5.4</strong>-08 Advanced Local User’s Guide Page 71

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!