📄 readdata.bas
字号:
'-------------------------------------------------------------
' READDATA.BAS
' Copyright 1997-2000 MCS Electronics
'-------------------------------------------------------------
Dim A As Integer , B1 As Byte , Count As Byte , Sgl As Single
Dim S As String * 15 'XRAM only !!!
Dim L As Long
Restore Dta1 'point to stored data
For Count = 1 To 3 'for number of data items
Read B1 : Print Count ; " " ; B1
Next
Restore Dta2 'point to stored data
For Count = 1 To 2 'for number of data items
Read A : Print Count ; " " ; A
Next
Restore Dta3 'strings can be used only with XRAM
Read S : Print S
Read S : Print S
Restore Dta4
Read L : Print L 'long type
Restore Dta5
Read Sgl : Print Sgl
End
Dta1:
Data &B10 , &HFF , 10
Dta2:
Data 1000% , -1%
Dta3:
Data "Hello" , "World"
'Note that integer values (>255 or <0) must end with the %-sign
'also note that the data type must match the variable type that is
'used for the READ statement
Dta4:
Data 123456789&
'Note that LONG values must end with the &-sign
'Also note that the data type must match the variable type that is used
'for the READ statement
Dta5:
Data 100.1!
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -