Classic Computer Magazine Archive COMPUTE! ISSUE 49 / JUNE 1984 / PAGE 10

Variables In Atari Filenames

Is there any way you can assign a filename to A$, and then open an Atari disk file named A$?

James Beach

Sure. Let's say someone INPUTs the name into a string:

10 DIM T$(40),A$(20)
100 PRINT "Filename":INPUT T$

You can then create a disk filename:

110 A$ = "D:":A$(3) = T$

now we OPEN the file, for read access:

120 OPEN #l,4,0,A$