Open


Open n, filename$, mode$

This command opens a file for reading or writing.

n

The file number to be opened. Up to 10 files may be open at any time. The file number identifies which file is being accessed. The file number ranges from 1 to 10.

filename$

This is a string expression specifying the file name and path.

mode$

The Mode may be "r", "w", or "w+". This string indicates if the file is to be opened for "r" - reading, "w" - writing, or "w+" - apending.


For example:


Open 1, "Test.txt", "w"
Writeln 1, "Hello World"
Close 1


This code opens a file called "Test.txt" for writing. The file number is 1. The line "Hello World" is written to file number 1. Then file number 1 is closed.

If you execute this code on your device, you could then mount your device and find your file in Mintoris.Basic/Data.

Mintoris.Basic/Data is the root directory for all file I/O.


Close


Read


ReadBytes


Readln


ReadFileI


ReadFileA


Write


WriteBytes


Writeln


WriteFileI


WriteFileA


Eof()


ChDir


RootDir






Become a Patron