64 bit integer in pascal

Write here if you have problems with your Pascal source code

Moderator: Board moderators

Post Reply
PMNOX
New poster
Posts: 49
Joined: Wed Feb 13, 2002 2:00 am
Location: Poland
Contact:

64 bit integer in pascal

Post by PMNOX » Sat Feb 01, 2003 8:46 pm

How to use 64 bit integer in pascal?

Jordan Gordeev
New poster
Posts: 14
Joined: Tue Nov 12, 2002 6:04 pm
Location: Bulgaria

Post by Jordan Gordeev » Sun Feb 02, 2003 8:18 pm

The Judge's Pascal compiler (Free Pascal) has 64-bit signed integer type called Int64

User avatar
little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

Post by little joey » Tue Feb 04, 2003 10:34 pm

Or QWord for the unsigned type. Here's the complete list:

Code: Select all

           signed     unsigned

8  bit     ShortInt   Byte
16 bit     SmallInt   Word
32 bit     LongInt    Cardinal
64 bit     Int64      QWord
The judge uses the -Sd compiler option, so the default 16 bit signed integer type 'Integer' is redefined to be equivalent to the 32 bit signed integer type 'LongInt'. To have the judge's compiler settings at home, either compile with this option, or include the line[pascal]{$MODE DELPHI}[/pascal] at the top of your code. I always use the last method.
For the unsigned 32 bit type you can also use 'DWord' or 'LongWord'.

Post Reply

Return to “Pascal”