Peter Gerwinski wrote:
I have heared of a library "gmp" which could be a useful tool to achieve this. Just write a Pascal interface for it ...
I'll look for it (when I've got some time... ;-)
BTW: Is there any information about schema types and/or PXSC available? I don't know more about them than I saw in some examples.
So do I. :-(
How do you know about PXSC, anyway?
I did a Yahoo search on "PXSC", and it showed quite a few interesting things about PXSC (besides a few other things abbreviated by "PXSC" and several links to gpc pages :-), e.g. PXSC "home pages":
http://ma70.rz.uni-karlsruhe.de/~ae25/iam/html/language/xsc-sprachen.html http://wwwma.rz.uni-karlsruhe.de/~ae08/iam/html/language/pxsc.html
I also learned about even more Pascal extensions, like XL Pascal and Pascal++ (see http://www.informatik.uni-halle.de/lehre/pascal/sprache/pas0.html).
On a page about BP, I found this remarkable statement: "Borland is the leader in Object-Oriented Programming, winning more awards for technical innovation and customer support than anyone else. That means that when you use Turbo Pascal, you're guaranteed to have the best development environment available, backed by the best support available. It's Borland's commitment to you. [...] Copyright ) 1995 Borland International, Inc." Things must have changed very much within 2 years... :-(
Think of a schema as a type declaration with parameters which can occur anywhere in the declared type: as array or subrange boundaries, or as a variant record selector.
Anywhere??? (roots:array[1..1+ord(sqr(p)/4-q<>0)] of complex;-)
(I just tried it, it gives an internal compiler error. Not that I'd expect this to compile, but I heard somewhere, internal errors should always be reported...)
I doubt whether this is really useful. Numbers of this size aren't usually typed in as decimal digits, but they are characterized as "2 pow 103 - 2 pow 97 + 3 pow 13". And you can always write a function which accepts a string or a chain of integers or whatever and returns a long number.
[...]
Then the compiler would have to use this arbitrary-precision library (gmp?) by itself because a number must be multiplied by ten each time a digit is read.
Not really the whole library; multiplying a long number by 10 (or any base) would be relatively easy to do manually. But you're right, it won't probably be needed too often, so this little inefficiency of the conversion at runtime seems tenable... :-) ... except, maybe, if PXSC demands it ...?