Remote-processing BASIC 52 Instrukcja Użytkownika Strona 29

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 163
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 28
RPBASIC-52 PROGRAMMING GUIDE
2-10
NOTE: This command takes approximately 27 ms to process. This is because the reader sends a bit of
information every 1 ms. Serial and timing interrup ts are processed a t the hardware level. However,
commands such as ONTICK and ONITR are delayed until CARD$ is finished processing the data.
RELATED
CONFIG LINE
ERROR
BAD ARGUMENT When expr > 3 or negative
EXAMPLE
The following example reads the card. CONFIG LIN E is performed only once. The error code is returned in
B if no card was swiped.
CONFIG LINE 100,12,0,255,0,0
10 STRING 200,10
100 GOSUB 1000
110 IF B = 1 THEN 100
120 PRINT "Card number: ",$(0)
130 GOTO 100
1000 $(0) = CARD$(0)
1010 IF ASC($(0),1)= 45 THEN 1040:REM See if '-'
1020 B=0
1030 RETURN
1040 B = ASC($(0),2)-48:REM Return error number
1050 $(0)= ""
1060 RETURN
Przeglądanie stron 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34 ... 162 163

Komentarze do niniejszej Instrukcji

Brak uwag