Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
23
Task/Empty-string/COBOL/empty-string.cobol
Normal file
23
Task/Empty-string/COBOL/empty-string.cobol
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. EMPTYSTR.
|
||||
|
||||
DATA DIVISION.
|
||||
WORKING-STORAGE SECTION.
|
||||
01 str PIC X(10).
|
||||
|
||||
PROCEDURE DIVISION.
|
||||
Begin.
|
||||
|
||||
* * Assign an empty string.
|
||||
INITIALIZE str.
|
||||
|
||||
* * Or
|
||||
MOVE " " TO str.
|
||||
|
||||
IF (str = " ")
|
||||
DISPLAY "String is empty"
|
||||
ELSE
|
||||
DISPLAY "String is not empty"
|
||||
END-IF.
|
||||
|
||||
STOP RUN.
|
||||
Loading…
Add table
Add a link
Reference in a new issue