Remove_String; Repeat; Restart_All_Wait; Restart_Wait - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Keywords & Run-Time Library Functions (Cont.)

REMOVE_STRING

REPEAT

RESTART_ALL_WAIT

RESTART_WAIT

RETURN

RIGHT_STRING

NetLinx Programming Language Reference Guide
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' *)
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.
This command resumes all waits that were previously paused. This includes
both named and unnamed waits.
This keyword resumes the specified (named) wait previously paused by a
PAUSE_WAIT command.
RESTART_WAIT '<wait name>'
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.
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)
Reserved Identifiers
// Substr = 'EFG'
147

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents