🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #576

Re: Run time error: Division by zero???

#576
From: AJs
Date: Thu, 11 Sep 1997 00:00
34 lines
2127 bytes
> I'm posting this question for a friend of mine. Recently he bought an
> original release of Turbo Pascal 7.0 for DOS for his PC running
> Windows 95. The installation of the programs is straightforward and
> without any problems. At least so it seems. When he tries to run
> the following very small program unexpected things happen.
> PROGRAM Dummy;
> USES Crt;
> BEGIN
>    Writeln 'Hello world';
> END.
> Compiling and building the executable are also without problems.
> But when he tries to run the program in most cases he will get
> the run time error message:
>   Run time error: Division by zero.
> 
> To make things even stranger, sometimes the execution of the program
> produces 'Hello world', as expected.
> Of course when the Crt line is omitted the program executes as it
> should.
> 
> Does anyone have any idea where this problem comes from and how
> to solve it?

Well the only thing I can see is that "writeln" line should be

writeln ('Hello world');

Put brackets around the things in the single quotation marks...

Make sure he's compiling to REAL MODE as well... :-)

> Thanks in advance,
Thats ok in retrospect... ;)
Technical Details
Message-ID: <34179DB4.2EEA@mercury.tekotago.ac.nz>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <5v3evd$in5@news01.uni-trier.de> <34164289.4264001@news.bernoise.ch> <5v6g2e$h46$1@trunk.wins.uva.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fd1d1,1b964d2586c50e55
X-Google-Attributes: gidfd1d1,public
X-Google-Thread: 111005,1b964d2586c50e55
X-Google-Attributes: gid111005,public
X-Google-Thread: 16d617,1b964d2586c50e55
X-Google-Attributes: gid16d617,public
X-Google-Thread: 111659,1b964d2586c50e55
X-Google-Attributes: gid111659,public
X-Google-Thread: 10843a,1b964d2586c50e55
X-Google-Attributes: gid10843a,public
From: AJs <singlaj1@mercury.tekotago.ac.nz>
Subject: Re: Run time error: Division by zero???
Date: 1997/09/11
Message-ID: <34179DB4.2EEA@mercury.tekotago.ac.nz>
X-Deja-AN: 271609394
References: <5v3evd$in5@news01.uni-trier.de> <34164289.4264001@news.bernoise.ch> <5v6g2e$h46$1@trunk.wins.uva.nl>
Reply-To: singlaj1@mercury.tekotago.ac.nz
Organization: Otago Polytechnic, New Zealand
Newsgroups: comp.lang.pascal.borland,de.comp.lang.pascal,swisslink.pascal,zer.z-netz.sprachen.pascal,ch.general