English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

For example, I want to display the sign in terms of its hex value - x'C', x'D', x'F' etc. Please help.

2006-10-13 23:57:32 · 2 answers · asked by smita3010 1 in Computers & Internet Programming & Design

2 answers

01 packed-field pic s9(3) comp-3
01 text-field redefines packed-field pic x(2).

Procedure division.
...
display text-field.

Now are you going to give us some more information?
What operating system are you running this program on?
How are you viewing the output?

What more would you like to know?

2006-10-14 00:17:18 · answer #1 · answered by AnalProgrammer 7 · 0 0

01 binary-number s9(4) comp value 15. 01 text-binary-number redefines binary-number. 03 filler pic x. 03 test-unsigned-value pic x. 01 packed-number s9(3) comp-3. 01 text-packed-number redefines packed-number. 03 filler pic x. 03 packed-sign pic x. procedure division. if test-unsigned-value and packed-sign equals test-unsigned-value then ... end-if. That should work for unsigned values. set the binary value to 13 for negative and 12 for positive. And don't forget to close your previous questions and allocate 10 points!!!

2016-05-22 01:05:07 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers