4-313
Detailed Explanation of Functions
4MELFA-BASIC IV
Chr$
[Function]
Returns the character that has the character code obtained from the specified equation.
[Format]
[Reference Program]
1 M1=&H40
2 C1$=Chr$(M1+1)
' "A" is assigned to C1$.
[Explanation]
(1) Returns the character that has the character code obtained from the specified equation.
(2) If the equation does not evaluate to an integer, the character will be returned whose character code cor-
responds to the integral value obtained by rounding the fraction.
[Reference]
Cint
[Function]
Rounds the fractional part of an equation to convert the value into an integer.
[Format]
[Reference Program]
1 M1=Cint(1.5)
' 2 is assigned to M1.
2 M2=Cint(1.4)
' 1 is assigned to M2.
3 M3=Cint(-1.4)
' -1 is assigned to M3.
4 M4=Cint(-1.5)
' -2 is assigned to M4.
[Explanation]
(1) Returns the value obtained by rounding the fractional part of an equation.
[Reference]
<Character String Variable >=Chr$(<Equation>)
<Numeric Variable>=Cint(<Equation>)