Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing file opening, assert condition is false
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
weird




PostPosted: Thu Oct 15, 2020 1:43 pm   Post subject: Turing file opening, assert condition is false

What is it you are trying to achieve?
I am trying to open and display a .txt document


What is the problem you are having?
I am trying to open a file, but it always says assert condition is false. I even copied my teachers example code, and it didn't work for me


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:


var streamnumber : int

open : streamnumber, "NewText.txt", get

assert streamnumber > 0

var line : string

loop
    exit when eof(streamnumber)
    get : streamnumber, line
    put line
end loop

close : streamnumber




Please specify what version of Turing you are using
4.11
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: