Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!swrinde!mips!decwrl!bacchus.pa.dec.com!shlump.nac.dec.com!vaxwrk.enet.dec.com!granoff From: granoff@vaxwrk.enet.dec.com (Mark H. Granoff) Newsgroups: comp.lang.pascal Subject: Re: TP: Exponentiation? Message-ID: <13849@shlump.nac.dec.com> Date: 25 Jul 90 12:33:01 GMT References: <950036@hpclapd.HP.COM> Sender: newsdaemon@shlump.nac.dec.com Reply-To: granoff@vaxwrk.enet.dec.com (Mark H. Granoff) Organization: Digital Equipment Corporation, Maynard MA Lines: 24 In article <950036@hpclapd.HP.COM>, defaria@hpclapd.HP.COM (Andy DeFaria) writes: > Perhaps I'm just brain-dead and unable to hear the doctor pronnounce me > comotose (sp?) but how to you do exponentiation in TP 4.0 (or 5.0 or 5.5). > I scanned the section about arithmetic operators in the TP book that I have > (5.5) and searched the index but I found no mention on exponentiation and > the usually "**" operator only produced a compile error. What gives? Nothing gives. There's no built-in operator in Turbo Pascal for exponentiation. Write a function instead. Of course, if you are using C++, you could overload an operator, like ^ for example. --------------------------------------------------------------------------- Mark H. Granoff | Enterprise Integration Services/Engineering VAXworks --------------------------------------------------------------------------- Digital Equipment Corporation | ARPAnet: granoff@vaxwrk.enet.dec.com 129 Parker Street | Usenet : ...!decwrl!vaxwrk.dec.com!granoff PKO2-1/M21 | AT&T : +1 508 493 4512 Maynard, MA 01754 | FAX : +1 508 493 2240 --------------------------------------------------------------------------- Opinions herein are my own and do not necessarily reflect those of Digital. ---------------------------------------------------------------------------