Commodore Computer Commodore 64 Uživatelský manuál Strana 25

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 65
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 24
characters if the numbers are positive.
Here is a picture of the file after the statement PRlNT# 5, I; 3; 5; 7 is
performed:
char IS
fIle.
Appendix B contains a program demonstrating the use of a sequential disk
GET#
The GET# retrieves data from the disk, one character at a time.
FORMAT FOR THE GET# STATEMENT:
GET# f1le#, variable list
Data comes in byte by byte, including the CR, comma, and other
separating characters. It is much safer to use string variables when using the
GET# statement. You will get a BASICerror message if string data is received
where a number was requested, but not vice-versa.
EXAMPLES OF GET#STATEMENT:
GET# 5, A$
You can get more than I character at a time
GETS 5, A
The GET# statement is extremely useful when examining files with
unknown contents, like a file that may have been damaged by an experimental
program. It is safer than INPUT# because there is a limit to the number of
characters allowed between separators of INPUT variable.s.With GET#, you
receiveevery character, and you can examine separators as well asother data.
Here is a sample program that will allow you to examine any file on the
disk:
10 INPUT"FILE NAME"; F$
20 INPUT "FILE TYPE";T$
30 T$=LEFTS(TS,1)
40 IF TS < > "s" THEN IF T$ < > "P" THEN IF T$ < > "u" THEN 20
45 OPEN 15,8,15
50 OPEN5,8,5, "0:" + F$+ ","+ T$+ ",R"
60 GOSUB200
22
Zobrazit stránku 24
1 2 ... 20 21 22 23 24 25 26 27 28 29 30 ... 64 65

Komentáře k této Příručce

Žádné komentáře