Help to get a write problem fixed
Author |
Message |
thoughtful
![](http://www.chiefdelphi.com/pics/myfiles/1069591541avatar1.jpg)
|
Posted: Mon Sep 29, 2003 9:16 pm Post subject: Help to get a write problem fixed |
|
|
Ok....here is the code for writing records to a file...which i will use for a porogram..The only problem is that every time i run it, it deletes all the previous information in the text file.
if n e one can help me with this i will be really grateful.
-=code starts here=-
var stream : int
var d_city, a_city : string
var dist : string
open : stream, "database", put
assert stream > 0
loop
put "Airport Database Creator"
put "Please enter the name of departure city or put 'stop' now to Quit "
get d_city : *
exit when d_city = "stop"
put "Please enter the name of arrival city"
get a_city
put "Please enter distance between ", d_city, " and ", a_city, " ."
get dist
put : stream, d_city
put : stream, a_city
put : stream, dist
end loop
close : stream
-=code ends here=-
*it will generate the text file once u run it. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
AsianSensation
|
Posted: Mon Sep 29, 2003 10:27 pm Post subject: (No subject) |
|
|
yes, it's suppose to delete the file once you output to it new items.
there is a tutorial about this, in the tutorial section, forgot the link, but it should be a sticky. |
|
|
|
|
![](images/spacer.gif) |
AsianSensation
|
|
|
|
![](images/spacer.gif) |
|
|