View previous topic :: View next topic
|
Author |
Message |
jackal Currently Banned New User
Joined: 21 Jan 2006 Posts: 48 Location: india
|
|
|
|
Hi All,
Could anyone let me know what values this element would take:-
A pic 999v9(10) value 000000000000500000.
when refer modification as (10:9), and when (11:8).
Thanks... |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Please explain your question bit more.. It is really confusing us..
Code: |
A pic 999v9(10) value 000000000000500000. |
For above declaration compiler will give error as the value specified in value clause exceeds the limit.
Suggestion is, you should experiment such things instead of asking on forum, it will save your time and learning will be more. |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
You can't refer to a PIC 9 anything so well with reference mod. The value does not exceed the declaration. Since it is a number going into a numeric it will right align and chop the high order bits. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
stodolas wrote: |
You can't refer to a PIC 9 anything so well with reference mod. The value does not exceed the declaration. Since it is a number going into a numeric it will right align and chop the high order bits. |
You can use reference mod with pic 9 fields as long as they are display. But both (10:9) and (11:8) would cause a compile error since they exceed the length of the field. |
|
Back to top |
|
|
|