From 2c95dc91e913cd76dfd6c38f36c296d46c29876c Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Tue, 25 Apr 2023 11:15:21 +0100 Subject: [PATCH] iocsh: add comment to cvtArg explaining default iocsharg behaviour --- modules/libcom/src/iocsh/iocsh.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/libcom/src/iocsh/iocsh.cpp b/modules/libcom/src/iocsh/iocsh.cpp index f283739d2..29c104ef6 100644 --- a/modules/libcom/src/iocsh/iocsh.cpp +++ b/modules/libcom/src/iocsh/iocsh.cpp @@ -759,6 +759,13 @@ void epicsStdCall iocshFree(void) iocshTableUnlock (); } +/* + * Parse argument input based on the arg type specified. + * It is worth noting that depending on type this argument may + * be defaulted if a value is not specified. For example, a + * double/int with no value will default to 0 which may allow + * you to add optional arguments to the end of your argument list. + */ static int cvtArg (const char *filename, int lineno, char *arg, iocshArgBuf *argBuf, const iocshArg *piocshArg)