View previous topic :: View next topic |
Author |
Message |
javedsk12 Beginner
Joined: 14 Dec 2007 Posts: 66 Topics: 36 Location: pune
|
Posted: Wed Mar 26, 2008 12:31 am Post subject: why to put value as +0 |
|
|
hi,
this would seem the question for novice but really i am not getting that,
most of the values are initialized like this :
77 a pic 9(2) value is +0
Regards
javed shaikh _________________ javed
-----------------------
The Word Impossible it self says i am possible(im possible) |
|
Back to top |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Wed Mar 26, 2008 10:31 am Post subject: |
|
|
My guess is that it's old code and the programmer did it out of force of habit. If the picture was signed as in S9(2), the assignment of the plus sign would have saved the compiler the time to assign the plus sign to the value. Time savings would have been negligible, but compliler time was more expensive decades ago. I can see no valid reason for it's use today. Also, since 77 levels have the disadvantage of being aligned on a double-word boundary, they are no longer encouraged by many shops. Another indication of "old" code. _________________ ....Terry |
|
Back to top |
|
|
mf_user Intermediate
Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Wed Apr 02, 2008 7:20 am Post subject: |
|
|
Terry,
I am interested to know more about the '77' lever disadvantage. Would you please explain with examples?
Thanks. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
== |
|
Back to top |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Wed Apr 02, 2008 8:44 am Post subject: |
|
|
Being double-word aligned, 77 levels reserve a multiple of 8 bytes for storage. An 8-byte field will reserve 8 bytes of storage, a 7-byte field will reserve 8 bytes, a 1-byte field, 8 bytes, a 9-byte field, 16 bytes, etc. To see this, check a compile listing data division map (or look at a formatted dump). _________________ ....Terry |
|
Back to top |
|
|
|
|