Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Checking value of alphanumeric and numeric zero

$
0
0

My second paragraph in my previous response needs a punctuation change to be clearer.  It should have read as follows:

In standard (and Micro Focus) COBOL, moving 0 to an PIC X item results in the character "0" being stored in the data item (there is an implied conversion from numeric to alphanumeric).  Comparing the PIC X item to ZERO or "0" is the same alphanumeric comparison.  For a PIC X(n) item, it's different in that it's a comparison to a string with n "0" characters in it.  The figurative constant ZERO (ZEROES, ZEROS) is either alphanumeric when associated with an alphanumeric item or numeric when associated with a numeric item.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>