Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
26
Task/Function-definition/COBOL/function-definition-1.cob
Normal file
26
Task/Function-definition/COBOL/function-definition-1.cob
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. myTest.
|
||||
DATA DIVISION.
|
||||
WORKING-STORAGE SECTION.
|
||||
01 x PICTURE IS 9(3) VALUE IS 3.
|
||||
01 y PICTURE IS 9(3) VALUE IS 2.
|
||||
01 z PICTURE IS 9(9).
|
||||
PROCEDURE DIVISION.
|
||||
CALL "myMultiply" USING
|
||||
BY CONTENT x, BY CONTENT y,
|
||||
BY REFERENCE z.
|
||||
DISPLAY z.
|
||||
STOP RUN.
|
||||
END PROGRAM myTest.
|
||||
|
||||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. myMultiply.
|
||||
DATA DIVISION.
|
||||
LINKAGE SECTION.
|
||||
01 x PICTURE IS 9(3).
|
||||
01 y PICTURE IS 9(3).
|
||||
01 z PICTURE IS 9(9).
|
||||
PROCEDURE DIVISION USING BY REFERENCE x, y, z.
|
||||
MULTIPLY x BY y GIVING z.
|
||||
EXIT PROGRAM.
|
||||
END PROGRAM myMultiply.
|
||||
26
Task/Function-definition/COBOL/function-definition-2.cob
Normal file
26
Task/Function-definition/COBOL/function-definition-2.cob
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. myTest.
|
||||
ENVIRONMENT DIVISION.
|
||||
CONFIGURATION SECTION.
|
||||
REPOSITORY.
|
||||
FUNCTION myMultiply.
|
||||
DATA DIVISION.
|
||||
WORKING-STORAGE SECTION.
|
||||
01 x PICTURE IS 9(3) VALUE IS 3.
|
||||
01 y PICTURE IS 9(3) VALUE IS 2.
|
||||
PROCEDURE DIVISION.
|
||||
DISPLAY myMultiply(x, y).
|
||||
STOP RUN.
|
||||
END PROGRAM myTest.
|
||||
|
||||
IDENTIFICATION DIVISION.
|
||||
FUNCTION-ID. myMultiply.
|
||||
DATA DIVISION.
|
||||
LINKAGE SECTION.
|
||||
01 x PICTURE IS 9(3).
|
||||
01 y PICTURE IS 9(3).
|
||||
01 z PICTURE IS 9(9).
|
||||
PROCEDURE DIVISION USING x, y RETURNING z.
|
||||
MULTIPLY x BY y GIVING z.
|
||||
GOBACK.
|
||||
END FUNCTION myMultiply.
|
||||
Loading…
Add table
Add a link
Reference in a new issue