10.07.2015 Views

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

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.

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>Table Driven Command Processor FunctionsCmdConfirm –Prompt for confirmationDescription:Prototype:Inputs:Returns:Notes:Prompt the user for confirmation. Any prompt and any character. Example:bool CmdConfirm(char *prompt, char trueReply);*prompt is a string to displaytrueReply is the character that will return a TRUETRUE or FALSE depending on if trueReply is receivedHandles upper and lower case automatically. Example:cprintf("CmdConfirm returned %s\n",(CmdConfirm("’Y’ or ‘y’? for TRUE otherwise FALSE: ", 'Y'))?("TRUE"):("FALSE"));CmdDispatch – Dispatch commandDescription:Prototype:Inputs:Returns:Dispatch command with the options all contained in the CmdInfoPtr.char *CmdDispatch(CmdInfoPtr cip);cip is a pointer to the CmdInfoPtr structurePointer to command stringCmdExpectRange – Validate RangeDescription:Prototype:Inputs:Returns:Notes:Return non-zero if the next two arguments specified by the argc index are numeric values, andit places copies of the range in start and end.int CmdExpectRange(CmdInfoPtr cip, short index, long *start, long *end);cip is a pointer to the CmdInfoPtr structureindex is the index to the arguments*start is the start range*end is the end rangeReturns non-zero if the next two arguments specified by the argc index are numeric valuesNote this function only works correctly if CmdExtractArgValues() has already been called.CmdExpectValue – Validate and Get ValueDescription:Prototype:Inputs:Returns:Notes:Returns non-zero if the specified argument index is a numeric value, and it places a copy of thatnumber in the variable value.int CmdExpectValue(CmdInfoPtr cip, short index, long *value);cip is a pointer to the CmdInfoPtr structureindex is the index into the arguments*value get the argumentReturns 1 if the argument was extracted and zero otherwiseNote this function only works correctly if CmdExtractArgValues() has already been called.PERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.61 of 84<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>7/19/2005

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

Saved successfully!

Ooh no, something went wrong!