Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!cass.ma02.bull.com!mips2!bull.bull.fr!corton!mcsun!cernvax!chx400!urz.unibas.ch!koenig From: koenig@urz.unibas.ch Newsgroups: comp.lang.c++ Subject: Re: c++ and complex numbers Message-ID: <1991May21.090932.1571@urz.unibas.ch> Date: 21 May 91 08:09:32 GMT References: <480@al.wfw.wtb.tue.nl> Organization: University of Basel, Switzerland Lines: 24 In article <480@al.wfw.wtb.tue.nl>, reuder@lso.win.tue.nl (Peter Reuderink) writes: > Although it is possible to define new types or records in Pascal, > one is always confronted with problems when trying to write complex > functions is Pascal since the output of a function can never be > two values, i.e. real and imaginary. Therefore one is forced to > use subroutines for even the most simple problems, making your > code unreadable, and time-consuming. > > However, can someone tell me if it can be done in c++?? Or are there > any other languages able to deal with complex numbers. The main requirement for convenient use of complex numbers is the general operator concept. Some existing programming languages offer this feature: ADA, Pascal-SC, Fortan-SC, Modula-SC. "SC" indicates that these languages are extensions for Scientific Computation. Complex numbers may be handled as in C++ like built-in types. If you like, see G. Bohlender et al., Pascal-SC: A Computer Language for Scientific Computation. Perspektives in computing, 17, 1987. Academic Press, Orlando. Bye, Stefan Koenig