Skip to content

Instantly share code, notes, and snippets.

@brakmic
Last active Nov 24, 2017
Embed
What would you like to do?
HelloWorld in COBOL (Win32 version)
>>SOURCE FORMAT FREE
IDENTIFICATION DIVISION.
PROGRAM-ID. HelloWorld.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 HWND PIC 9(1) VALUE 0.
01 MSG PIC X(17) VALUE "Hello, World! :-)".
01 CAPTION PIC X(8) VALUE "GnuCOBOL".
01 STYLE PIC 9(1) VALUE 0.
PROCEDURE DIVISION.
CALL "MessageBoxA" USING
BY VALUE HWND
BY REFERENCE MSG
BY REFERENCE CAPTION
BY VALUE STYLE
END-CALL
STOP RUN.
END PROGRAM HelloWorld.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment