TIP: Click on subject to list as thread! ANSI
echo: z3_pascal
to: All
from: Adam Whitehead
date: 1996-03-17 18:11:30
subject: File Output ..

Hi All,

I'm writing a configuration program in TP7 which involves reading user
input using a normal readln procedure to read their input as a variable and
write it to a normal text file. The problem is with the code I have
occasionally had a RUNTIME ERROR 105 which refers to a program not opening
and resetting a file for output before writing to it. I *THINK* I may have
ironed out this bug but if anyone could help by checking it out to make
sure there are no potential problems.. or if you have a better way of doing
it  let me know ... here is a snippet... :

[snip]
Write('What is the name of your BBS? ');
Readln(BBSName);
Assign(ConfigN,'RDAWN.CFG');
Reset(ConfigN);
Rewrite(ConfigN);
Writeln(ConfigN,BBSName);
[end]

The variables ConfigN and BBSName have been declared correctly as TEXT and
STRING respectively. The file is also closed after input but the
Close(ConfigN) isn't displayed here because there is a lot more to that
config file ;)

Cheerz
Adam

--- Ezycom V1.20g0 03fa002d
* Origin: Shady's BBS (3:850/106)
SEEN-BY: 633/267 270
@PATH: 850/106 100 800/1 711/808 50/99 635/544 727 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.