View previous topic :: View next topic
|
Author |
Message |
fayum
New User
Joined: 27 Feb 2004 Posts: 2 Location: chennai
|
|
|
|
in comp3 what is the maximum number digits that can be decalred like s9(?)comp3[/b] |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Fayum,
Ignoring the remainder:
The # of bytes = ? / 2 + 1
For example: # of bytes in S9(5) = 5 / 2 = 2 remainder 1
= 2 +1
= 3
For example: # of bytes in S9(4) = 4 / 2 = 2 remainder 0
= 2 +1
= 3
What this tells us is to use an odd # of 9s in the PIC. It gives you more bang for the byte and its more efficient too.
HTH, Jack. |
|
Back to top |
|
|
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 1210 Location: India
|
|
|
|
Hai,
Great jack! I will summarize your post...
The answer for your ? is 18 in VS COBOL II*
* (It's depending on the compiler) |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Oops, looks like I misread the question.
Jack |
|
Back to top |
|
|
badal_mainframe
New User
Joined: 10 Aug 2004 Posts: 7
|
|
|
|
COMP-3 CAN BE DEFINED AS 77 A PIC S9(18) COMP-3 BUT IT AGAIN DEPENDS UPON COMPILERS INSTALLATION |
|
Back to top |
|
|
sandip_datta
Active User
Joined: 02 Dec 2003 Posts: 150 Location: Tokyo, Japan
|
|
|
|
In addition to Macmillan, if you consider compiler option ARTITH then -
ARITH(compressed) - Default - Max length of numeric item is 18
ARITH(Extend) - Max length of numeric item is 32
Regards,
Sandip. |
|
Back to top |
|
|
|