Sys(2013)
This function gives you a character string containing the pad and bar names of all the system menu items. We haven't found much use for it over the years, especially since the same information is available in the online help in a much easier to read format.
Usage |
cMenuItems = SYS(2013) |
Example |
* MakeMArr.PRG * make an array out of the system menu pad and bar names * Returns the number of items found * If there's a parameter problem, returns -1. * Sample Call: * nMenuCnt = MakeMArr(@aMenuItems) PARAMETERS aMenuArr * Have to pass menu in so it exists in calling program. LOCAL cMenuString,nCnt,nNextPos * cMenuString holds SYS(2013) return * nCnt is a counter * nNextPos = position of next blank in string * Make sure we've got an array IF TYPE("aMenuArr[1]")="U" * bail out RETURN -1 ENDIF cMenuString=SYS(2013) * Now parse the string * and create an array item for each item there nCnt=0 DO WHILE NOT EMPTY(cMenuString) nNextPos=AT(" ",cMenuString) IF nNextPos<>0 nCnt=nCnt+1 DIMENSION aMenuArr[nCnt] aMenuArr[nCnt]=LEFT(cMenuString,nNextPos-1) IF nNextPos<LEN(cMenuString) cMenuString=SUBSTR(cMenuString,nNextPos+1) ELSE cMenuString="" ENDIF ENDIF ENDDO RETURN nCnt |
See Also |