Quote:

> I have a question:

> How can i use very large numbers (2000 bit) in Pascal ?

I'm sure solutions are already in SWAG, but it isn't difficult to

implement an "infinite" precision integer package in Pascal. One (not

very optimal) way to do this is to express a number as a series of

digits in a linked list (i.e. "123" is the list "1" -> "2" -> "3"). You

need to develop functions or procedures to do arithmetic on these

"numbers", using the rules you learned in elementary school (add the

ones, take the carry, add the tens and the carry, take the carry, add

the hundreds and the carry, etc.). You are only limited by computer

memory.

Note that the above is decidedly NOT an efficient implementation.

However, you can easily generalize this idea of a representation as a

list, and do it all in Pascal, without needing assembler.

Bob Schor

Pascal Enthusiast