Download Manual BasicMaker 2008
Transcript
Returns True if the end of the file" has been reached.
FileNumber is the number assigned to the respective file by the Open command.
See also: Open
Example:
' Read 10 characters at a time from a file and display them.
' "Testfile" must already exist.
Sub Main
Open "TESTFILE" For Input As #1
Do While Not EOF(1)
MyStr = Input(10, #1)
MsgBox MyStr
Loop
Close #1
End Sub
' Open file
' Repeat until end of file
' Read 10 characters
' Close file
Erase (statement)
Erase ArrayName [, ...]
Re-initializes the elements of an array.
See also: Dim
Example:
Option Base 1
Sub Main
Dim a(10) As Double
Dim i As Integer
For i = 1 to 3
a(i) = 2 + i
Next i
Erase a
Print a(1), a(2), a(3)
End Sub
' Returns 0 0 0
Exit (statement)
Exit {Do|For|Function|Sub}
Exits from a Do loop, a For loop, a function, or a procedure.
See also: End, Stop
Example:
Sub Main
Dim Value, Msg
Do
Value = InputBox("Enter a number between 5 and 10.")
If Value >= 5 And Value <= 10 Then
Exit Do
' Number is OK -> Exit from the loop
Else
Beep
' Number is not OK -> try once more
End If
Loop
End Sub
Manual BasicMaker 2008
Commands and functions from A to Z • 291