Reserved Identifiers
147
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
REMOVE_STRING
This function removes characters from the specified string. All characters up to
and including the first occurrence of the specified sequence are removed.
CHAR[ ] REMOVE_STRING (CHAR STRING, CHAR Seq[ ], LONG
Start)
WIDECHAR[ ] REMOVE_STRING (WIDECHAR STRING, WIDECHAR Seq[
], LONG Start)
Parameters:
•
STRING
: String from which to find and remove characters.
•
Seq
: Sequence of characters to find.
•
Start
: Starting position in the string to begin search.
The result is a string containing the removed characters. If the character
sequence was not found, an empty string is returned.
STRING = 'ABCDEF'
Substr = REMOVE_STRING(STRING, 'BC', 1)
(* Substr = 'ABC' *)
(* STRING = 'DEF' *)
REPEAT
This keyword may be used with the
HOLD
keyword to specify that the (hold but-
ton) event should be allowed to repeat.
See the
Event Handlers
section on page 61 for more information.
RESTART_ALL_WAIT
This command resumes all waits that were previously paused. This includes
both named and unnamed waits.
RESTART_WAIT
This keyword resumes the specified (named) wait previously paused by a
PAUSE_WAIT
command.
RESTART_WAIT '<wait name>'
RETURN
This keyword is used in a
DEFINE_FUNCTION
or
DEFINE_CALL
subroutine to
prematurely terminate execution and/or to return a value to the caller. Only
DEFINE_FUNCTION
functions can return values using the
RETURN
statement.
The syntax of the
RETURN
statement is either:
RETURN // DEFINE_CALL or function with no return value
- or -
RETURN Value // function with return value
Upon execution of the
RETURN
statement, program control is immediately
returned to the caller. If the function containing the
RETURN
statement has a
declared return type, the parameter Value must be included and match the
specified type. If the function has no declared return type, the parameter Value
must be omitted.
RIGHT_STRING
Returns the specified number of characters from the end of a string.
CHAR[ ] RIGHT_STRING (CHAR STRING[ ], LONG Count)
WIDECHAR[ ] RIGHT_STRING (WIDECHAR STRING[ ], LONG Count)
Parameters:
•
STRING
: The string from which to extract the characters.
•
Count
: The number of character to copy from the end of the string.
The return is a string containing a copy of the last Count characters from
STRING
.
STRING = 'ABCDEFG'
Substr = RIGHT_STRING(STRING, 3) // Substr = 'EFG'
Содержание NETLINX PROGRAMMING LANGUAGE
Страница 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Страница 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Страница 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Страница 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Страница 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Страница 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Страница 114: ...Mainline 98 NetLinx Programming Language Reference Guide FIG 1 Message and Mainline Processing in the NetLinx System...
Страница 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Страница 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Страница 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Страница 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...