ВУЗ: Не указан
Категория: Не указан
Дисциплина: Не указана
Добавлен: 06.06.2021
Просмотров: 3228
Скачиваний: 5
601
2.
:
Write
; [<
>]
.
:
–
;
–
.
(
–
).
19.30.
3.
:
Put [#
; [#
],<
>
#
-
,
,
.
,
Get, Put, Seek.
19.31.
602
Type Record
ID As Integer
Name As String * 20
End Type
Dim MyRecord As Record
Open "TESTFILE" For Random As
#1 Len = Len(MyRecord)
For RecordNumber = 1 To 5
MyRecord.ID = RecordNumber
MyRecord.Name = "
-" & RecordNumber
Put #1, RecordNumber, MyRecord
Next RecordNumber
Close #1
,
1.
:
Input #
; <
>
,
.
19.32.
Open "FILE" For Input As #1
Do While Not EOF(l)
Input # 1 ; MyString; MyNumber
Debug.Print MyString; MyNumber
Loop
Close #1
Line Input #
; <
>
" (Chr(13))
.
19.33.
Open "TESTFILE" For Input As #1
Do While Not EOF(l)
Line Input #1, TextLine
Debug.Print TextLine
Loop
Close #1
,
Debug
2.
:
603
Get Put [#
; [#
],<
>
19.34.
(
)
:
Seek [#]
;
–
(1 - 2 147 483 647)
.
,
,
SEEK
.
19.35.
Dim MyChar As String
Open "FILE" For Input As #1
MaxSize = LOF(l)
,
,
,
,
.
19.36.
604
,
(
,
,
,
.).
MsgBox()
.
1.
MsgBox ("
")
,
.,
.
19.37.
Option Explicit
Sub Msg_Priim()
Dim a As Single
Randomize
a=rnd
MsgBox "
" & Str(a)
End Sub
(
. 19.23).
605
. 19.23.
2.
:
Msg
("
"[, <
>] [, "
"] [, <
>, <
>])
<
> -
– 1024
;
<
> -
,
,
;
<
> -
;
<
> -
,
;
<
> -
,
.
MsgBox()
. 19.7.
MsgBox()
(
),
.
1 9 . 7 .
0
vbOKOnly
OK
1
vbOKCancel
OK,
2
vbAbortRetryIgnore
,
,
3
vbYesNoCancel
,
,
4
vbYesNo
,
5
vbRetryCancel
,
19.38.