Hello,
I have programed the next function "Show_Message" and i need to know the length of the static message received by the function. Now, this length is a parameter, but it will be very interesting to know this length without counting the letters with the editor.
--->There is some kind of function like "Int a =Length("Text String")" to do that ?
example CALL: Show_Message(0,"START PROGRAM",13,TRUE)
DEF Show_Message(nNum:IN,sMsg:OUT,nTam:IN,bAVisible:IN)
DECL INT nNum
DECL CHAR sMsg[]
DECL INT nTam
DECL BOOL bAVisible
DECL STATE_T STATE
INT OFFSET
INT i
IF(m_bShowMessages OR bAVisible)THEN
$MSG_T={VALID FALSE,RELEASE FALSE,TYP #NOTIFY, MODUL[] " ",KEY[] " ", PARAM_TYP #VALUE, PARAM[] " ",DLG_FORMAT[] " ", ANSWER 0}
$MSG_T.MODUL[]=" "
FOR i=1 TO nTam STEP +1
$MSG_T.KEY[i]=sMsg[i]
ENDFOR
OFFSET = 0
SWRITE($MSG_T.PARAM[],STATE,OFFSET,"%d" ,nNum)
$MSG_T.PARAM_TYP=#VALUE
$MSG_T.VALID=TRUE
WHILE $MSG_T.VALID
WAIT SEC 0.1
ENDWHILE
;INFO: This is necessary for detect the rising edge of the $MSG_T.VALID
WAIT SEC 0.5
ENDIF
END
Thanks !!