🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Calculator

#587
From: Daniel Silverstone
Date: Mon, 22 Sep 1997 00:00
42 lines
1993 bytes
In article <3423C6A1.B56@geocities.com>
           *joke_dst@geocities.com "Joke Wennergren" writes:

> Dr Zeed wrote:

[Question Snipped]

>
> I'm afraid that can't be done in pascal. Sorry.
> 
> Joke/dST
>
There ain't much that can't be done in pascal somehow.
It may not seem immediately obvious to some, but it can always be done.

I have written some functions which evaluate expressions in Reverse
Polish (PostFix) Notation, e.g.

5 8 +
to give 13

and routines to convert infix expressions with +,-,/,*,^ and ()'s
such as:
(a+b)/(c+d)
into:
a b + c d + / 

There may not be an immediately obvois solution, but there usually is one
if you look hard enough...

-- 
Daniel Silverstone (Usually ;)

Look at the farstar Homepages on:
 http://www.farstar.demon.co.uk/

Try out Daniel's TPascal Page & Delphi 2.0 bits at
 http://www.farstar.demon.co.uk/Pascal/index.htm

Mail me & give comments (I know it's sparse ;)
 mailto:WebMaster@farstar.demon.co.uk
Technical Details
Message-ID: <874894773snz@farstar.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <01bcc51b$3c593780$a65ac6c2@anders> <3423C6A1.B56@geocities.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10261c,173f658d4bc382ca
X-Google-Attributes: gid10261c,public
X-Google-Thread: 111659,173f658d4bc382ca
X-Google-Attributes: gid111659,public
X-Google-Thread: fea06,173f658d4bc382ca
X-Google-Attributes: gidfea06,public
X-Google-Thread: 102601,173f658d4bc382ca
X-Google-Attributes: gid102601,public
X-Google-Thread: 10263e,173f658d4bc382ca
X-Google-Attributes: gid10263e,public
From: Daniel Silverstone <NewsTray@farstar.demon.co.uk>
Subject: Re: Calculator
Date: 1997/09/22
Message-ID: <874894773snz@farstar.demon.co.uk>
X-Deja-AN: 274812912
References: <01bcc51b$3c593780$a65ac6c2@anders> <3423C6A1.B56@geocities.com>
X-Mail2News-User: NewsTray@farstar.demon.co.uk
X-Mail2News-Path: punt-1.mail.demon.net!farstar.demon.co.uk
Organization: Disorganisation, more like
Reply-To: NewsTray@farstar.demon.co.uk
Newsgroups: comp.lang.pascal.borland,comp.lang.pascal.misc,ctdl.lang.pascal,maus.lang.tpascal,sk.comp.pascal