Xylem STORM 3 Basic Programming manual Instrukcja Użytkownika Strona 26

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 48
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 25
24
COMMANDS AND FUNCTIONS
Identifies a specific location by name. Commands such as GOTO and GOSUB can refer to and
send execution to named LABELs. Line numbers are a special case of LABELs and do not require
the LABEL prefix to be named.
h = 3
w = 4
d = 5
GOSUB 100 REM sets volume to 60
GOSUB ComputeArea REM sets area to 12
END
LABEL ComputeArea
area = h * w
RETURN
100
volume = h * w * d
RETURN
LABEL
Returns a string, starting from the left side, containing the given number of characters from the
given string.
var$ = “A1,B2,C3,D4”
ab$ = LEFT$(var$, 5)REM sets ab$ to A1,B2
LEFT$ (string, number)
Returns the length of the given string.
var = LEN(“A1,B2,C3,D4”) REM sets var to 11
LEN (string)
Reads an entire line from an open file.
OPEN “SiteID.csv” FOR READING AS #1
LINE INPUT #1, b$ REM retrieves the first line and stores it in b$
CLOSE #1
LINE INPUT
Przeglądanie stron 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 47 48

Komentarze do niniejszej Instrukcji

Brak uwag