OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki
OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki
OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Files and Directories 61<br />
Open Filename For Input As FileNo<br />
' Check whether file end has been reached<br />
Do While not eof(FileNo)<br />
' Read line<br />
Line Input #FileNo, CurrentLine<br />
If CurrentLine "" then<br />
Msg = Msg & CurrentLine & Chr(13)<br />
end if<br />
Loop<br />
' Close file<br />
Close #FileNo<br />
Msgbox Msg<br />
The individual lines are retrieved in a Do While loop, saved in the Msg variable, and<br />
displayed at the end in a message box.<br />
Source: http:/ / <strong>wiki</strong>. services. openoffice. <strong>org</strong>/ w/ index. php? title=Documentation/ <strong>BASIC</strong>_<br />
<strong>Guide</strong>/ Files_ and_ Directories_ (Runtime_ Library)&oldid=105645<br />
Principal Authors: Fpe, Ccornell, TJFrazier<br />
Message and Input Boxes<br />
<strong>OpenOffice</strong>.<strong>org</strong> Basic provides the MsgBox and InputBox functions for basic user<br />
communication.<br />
Displaying Messages<br />
MsgBox displays a basic information box, which can have one or more buttons. In its<br />
simplest variant the MsgBox only contains text and an OK button:<br />
MsgBox "This is a piece of information!"<br />
The appearance of the information box can be changed using a parameter. The parameter<br />
provides the option of adding additional buttons, defining the pre-assigned button, and<br />
adding an information symbol. The values for selecting the buttons are:<br />
• 0 - OK button<br />
• 1 - OK and Cancel button<br />
• 2 - Abort, Retry, and Ignore buttons<br />
• 3 - Yes, No, and Cancel buttons<br />
• 4 - Yes and No buttons<br />
• 5 - Retry and Cancel buttons