Instr; Int - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

INSTR
INS
T
R (
[<start position> , J<searched string> , <searched for string> )
10 CLS
20 aLphabet$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
30 INPUT "Enter a Letter";a$
40 b$=UPPER$(a$)
50 PRINT b$;" is number";
60 PRINT INSTR(aLphabet$,b$);
70 PRINT "in the aLphabet.":PRINT
80 GOTO 40
run
FUNCTION: Searches the first <searched string> expression to find the <searched for
string> expression> and reports the position of its first occurrence within the <searched
string>. If the <searched for string> does not occur within the <searched string>, then 0
is reported.
The position at which to start searching the <searched string> is optionally specifiable
using the <start position> parameter which must yield an integer number in the range
1 to255.
Associated keywords: none
INT
I N T ( <numeric expression> )
PRINT INT(-1.995)
-2
FUNCTION: Rounds the number to the nearest smaller I NTeger, removing any
fractional part. Returns the same value as F I X for positive numbers, but returns one
less than
F
I X for negative numbers which are not already integers.
Associated keywords: C I N T, F I X, R 0 U N D
Chapter 3 Page 36
Complete List of Keywords

Advertisement

Table of Contents
loading

Table of Contents

Save PDF