I want to make a program that will start off by opening a text file(blank). The user will put an expression in the file and as he hits the enter(enters a newline character) the result will be shown in the next line of the same open file. Itz almost like replacing the console with a text file. The way mathematica and maple evaluates itz inputs. Is it possible without too much hassle?
Asif_NSU
25
Posting Whiz
Recommended Answers
Jump to PostIs there any reason this has to be an interactive file rather than an interactive terminal session that writes to a file periodically?
Jump to PostIt's possible, but not practical since on the surface an interactive terminal session has identical functionality and is considerably faster because an interactive file constantly reads from and writes to a slow physical device.
Jump to PostYes, do research on kbhit. You should find out quickly whether your implementation supports it or not, and how to write your own if it doesn't.
Jump to PostWhether it works or not really depends on what you want it to do. What were you expecting?
All 15 Replies
Narue
5,707
Bad Cop
Team Colleague
Asif_NSU
25
Posting Whiz
Narue
5,707
Bad Cop
Team Colleague
Asif_NSU
25
Posting Whiz
Narue
5,707
Bad Cop
Team Colleague
Asif_NSU
25
Posting Whiz
Narue
5,707
Bad Cop
Team Colleague
Asif_NSU
25
Posting Whiz
Narue
5,707
Bad Cop
Team Colleague
Asif_NSU
25
Posting Whiz
Narue
5,707
Bad Cop
Team Colleague
Asif_NSU
25
Posting Whiz
Narue
5,707
Bad Cop
Team Colleague
Asif_NSU
25
Posting Whiz
Narue
5,707
Bad Cop
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.