EasyManuals Logo

Mitsubishi MELFA CR1D User Manual

Mitsubishi MELFA CR1D
458 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #173 background imageLoading...
Page #173 background image
4MELFA-BASIC IV
Detailed explanation of command words 4-160
ChrSrch (Character search)
[Function]
Searches the character string out of the character array.
[Format]
[Terminology]
<Character string array variable> Specify the character string array to be searched.
<Character string> Specify the character string to be searched.
<Search result storage destination> The number of the element for which the character string to be searched
is found is set.
[Reference Program]
1 Dim C1$(10)
2 C1$(1)="ABCDEFG"
3 C1$(2)="MELFA"
4 C1$(3)="BCDF"
5 C1$(4)="ABD"
6 C1$(5)="XYZ"
7 C1$(6)="MELFA"
8 C1$(7)="CDF"
9 C1$(8)="ROBOT"
10 C1$(9)="FFF"
11 C1$(10)="BCD"
12 ChrSrch C1$(1), "ROBOT", M1 ' 8 is set in M1.
13 ChrSrch C1$(1), "MELFA", M2 ' 2 is set in M2.
[Explanation]
(1) The specified character string is searched from the character string array variables, and the element
number of the completely matched character string array is set in <search result storage destination>.
Partially matched character strings are not searched.
Even if ChrSrch C1$(1), "ROBO", M1 are described in the above statement example, the matched
character string is not searched.
(2) If the character string to be searched is not found, 0 is set in <search result storage destination>.
(3) Character string search is performed sequentially beginning with element number 1, and the element
number found first is set.
Even if ChrSrch C1$(3), "MELFA", M2 are described in the above statement example, 2 is set in M2.
(The same character string is set in C1$(2) and C1$(6).)
(4) The <character string array variable> that can be searched is the one-dimensional array only. If a two-
dimensional or higher array is specified as a variable, an error will occur at the time of execution.
ChrSrch[]<Character string array variable>,<Character string>,<Search result storage destination>

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELFA CR1D and is the answer not in the manual?

Mitsubishi MELFA CR1D Specifications

General IconGeneral
BrandMitsubishi
ModelMELFA CR1D
CategoryController
LanguageEnglish

Related product manuals