PDA

View Full Version : Exponents in Turbo Pascal


The Grimmus
Dec9-03, 06:18 PM
I'm doing a projext for school and I need to know how to use the ^ operator or if it even exists i looked everywhere and couldent find it.

dduardo
Dec9-03, 06:24 PM
I have no idea where you where looking, but the first hit from google had the answer:

http://www.midnightbeach.com/jon/pubs/clp-faq.htm#exponentiation

The Grimmus
Dec9-03, 06:25 PM
thanks

chroot
Dec9-03, 06:26 PM
Pascal, IIRC, doesn't have an exponentiation operator, but it does have built-in exp() and ln() functions, which can be composed as:

exp(y*LN(x))

which is the same as xy.

- Warren