COMP-1 and COMP-2 in COBOL.
Posted: Sat Oct 16, 2021 8:06 pm
Hi,
I have been asked an interview question recently which goes like this:
What do you mean by COMP-1 and COMP-2 in COBOL?
I answered it like this :
COMP-1 refers to a short or single-precision floating-point format, and it occupies storage of 4 bytes. COMP-2 refers to Long or double-precision floating-point format, and it occupies storage of 2 bytes.
The next question from interviewer left me speechless, He said, this is bookish definition tell me some practical use of it. Which I could not tell, could someone please help me with this.
I have been asked an interview question recently which goes like this:
What do you mean by COMP-1 and COMP-2 in COBOL?
I answered it like this :
COMP-1 refers to a short or single-precision floating-point format, and it occupies storage of 4 bytes. COMP-2 refers to Long or double-precision floating-point format, and it occupies storage of 2 bytes.
The next question from interviewer left me speechless, He said, this is bookish definition tell me some practical use of it. Which I could not tell, could someone please help me with this.