Files are referenced by numbers in PCC. You normally use the FreeFile() function to obtain a currently-unused file number. (Alternatively, you can hard-code file numbers, but this is not recommended.)

By convention, file numbers are written with a leading hash sign:

 Dim fd = FreeFile()
 Open "test.txt" For Input As #fd

In most cases, however, it is clear from context that you mean a file number, so you can omit the hash sign. The only case where the hash sign is required is the Print function.

Version Differences: The number of allowed files differs between PCC versions. PCC2 allows file numbers from 1 to 100, PCC 1.x only allows 1..20. (If you use FreeFile to obtain file numbers, you will not notice this difference, except for being able to open more files.)

Commands and Functions taking File as Parameter