Simple I/O Problem

new topic     » topic index » view thread      » older message » newer message

Hello,

So I am working with some simple file I/O, however when I go to test it, nothing appears on the screen.

atom handle 
object line 
 
handle = open("myfile.txt","w") 
 
if handle = -1 then 
    puts(1,"Could not create file!") 
    else 
	print(handle,"hello") 
end if 
 
close(handle) 
 
handle = open("myfile.txt","r") 
 
if handle = -1 then 
    puts(1,"Could not open file!") 
    else 
	line = gets(handle) 
end if 
 
close(handle) 

Any help as to why nothing appears on the screen. I am missing a simple step, a bug? It should create the text file, then read the text file and output what was in the text file. I am using Euphoria 4.0.5 and Windows 7 64-bit Ultimate.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu