Skip to content

Instantly share code, notes, and snippets.

@brakmic
Last active November 24, 2017 23:06
Show Gist options
  • Save brakmic/5f87fd8e465edde7b7debdde5e0605d8 to your computer and use it in GitHub Desktop.
Save brakmic/5f87fd8e465edde7b7debdde5e0605d8 to your computer and use it in GitHub Desktop.
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