ZERO SYNTAX IN COBOL



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

ZERO SYNTAX IN COBOL

Postby arya_starc » Wed May 11, 2016 7:07 pm

What is the difference between zero, zeros and zeroes and when to use which one in cobol program
arya_starc
 
Posts: 103
Joined: Mon Sep 21, 2015 1:39 pm
Has thanked: 4 times
Been thanked: 0 time

Re: ZERO SYNTAX IN COBOL

 

Re: ZERO SYNTAX IN COBOL

Postby Robert Sample » Wed May 11, 2016 7:25 pm

And what did the manual tell you when you read it?
Robert Sample
Global moderator
 
Posts: 3202
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 196 times

Re: ZERO SYNTAX IN COBOL

Postby Aki88 » Wed May 11, 2016 7:28 pm

Hello,

The best place to look at for such queries is the COBOL manual.
From the good old Language Reference:

ZERO, ZEROS, ZEROES
Represents the numeric value zero (0) or one or more occurrences of the
character zero, depending on context.
When the figurative constant ZERO, ZEROS, or ZEROES is used in a
context that requires an alphanumeric character, an alphanumeric character
zero is used. When the context requires a national character zero, a
national character zero is used (value NX'0030'). When the context cannot
be determined, an alphanumeric character zero is used.

---
---
Alternative spellings ZEROS and ZEROES for ZERO
---
---


Which is clear enough in itself.

Edit: My bad Robert; didn't see you'd already replied to the post. :oops:
Aki88
 
Posts: 338
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 32 times
Been thanked: 31 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post