View previous topic :: View next topic
|
Author |
Message |
Muthukumar.PLindia
New User
Joined: 03 Jul 2006 Posts: 51 Location: Chennai
|
|
|
|
HI,
Comp variables use less storage compared to COMP-3
as well as processing comp variables will be faster than comp-3(i guess)
then what might be the reason that comp-3 came into existence.....
Is comp-3 originated before comp.. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
Different amounts of money can be stored positive or negative.
Therefor they are declared as comp-3 because of the leading sign.
Comp variables don't have that sign included.
Regars, UmeySan |
|
Back to top |
|
|
prashanth1
New User
Joined: 27 Sep 2006 Posts: 47 Location: Hyderabad
|
|
|
|
I think , your assumptions are wrong.
COMP
1-4 Digits occupies 2 bytes of memory (half-word)
5-9 Digits occupies 4 bytes of memory (full-word)
10-18 Digits occupies 8 bytes of memory(double-word)
COMP-3
9 digits will be stored in 5 bytes (n/2+1)
18 digits will be stored in 10 bytes
Means that , all these should be depend on their boundaries.
Pls correct Me, If I wrng |
|
Back to top |
|
|
|