EasyManua.ls Logo

Mitsubishi MELFA CR1D - Page 350

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
Loading...
4-337 Detailed Explanation of Functions
4MELFA-BASIC IV
Sqr
[Function]
Calculates the square root of an equation value.
[Format]
[Reference Program]
1 M1=Sqr(2) ' 1.414214 is assigned to M1.
[Explanation]
(1) Calculates the square root of the value to which the given equation evaluates.
(2) An error will be generated if the equation given by the argument evaluates to a negative value.
Strpos
[Function]
Searches for a specified string in a string.
[Format]
[Reference Program]
1 M1=Strpos("ABCDEFG","DEF") ' 4 is assigned to M1.
[Explanation]
(1) Returns the position of the first occurrence of the string specified by argument 2 from the string specified
by argument 1.
(2) An error will be generated if the length of the argument 2 is 0.
(3) For instance, if argument 1 is "ABCDEFG" and argument 2 is "DEF", 4 will be returned.
(4) If the search string could not be found, 0 will be returned.
(5) It is not possible to describe a function that contains an argument in <Character String 1> and <Charac-
ter String 2>. If such a function is described, an error will be generated during execution.
<Numeric Variable>=Sqr(<Equation>)
<Numeric Variable>=Strpos(<Character String 1>, <Character String 2>)

Table of Contents

Related product manuals