Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
carrfamily Absent Member.
Absent Member.
345 views

Theoretically possible to program statistical animation in Micro Focus COBOL?

I've got Visual COBOL 3.0 for Visual Studio 2017.  In theory, would it be possible to program in Visual COBOL something like that shown in the attached YouTube (which was programmed in C++).  Yes, I want to do it in COBOL, just because.  Any advice or examples would be greatly appreciated. 

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

RE: Theoretically possible to program statistical animation in Micro Focus COBOL?

Of course it's theoretically possible. COBOL is a Turing-complete language, and MF COBOL can call entry points using the standard ABIs on the platforms it's supported on; so it can 1) compute any function computable in C++, and 2) use platform facilities such as graphical output.

That said, drawing graphics using the low-level GUI APIs is tiresome - I did quite a bit of it, many years ago. Since you're using VC for Visual Studio, we know you're on Windows; that means you have various choices for drawing graphics. The classical Windows graphics APIs are GDI and GDI+. These days developers are more likely to use Direct2D and Direct3D, but those are overkill for something like this.

In general, if someone wanted to know how to do low-level graphics output on Windows, I'd refer them to the Microsoft GDI documentation (see for example the reference for the Polygon function in MSDN) and a graphics textbook such as Foley (though there seem to be a lot of Open Courseware graphics texts available free online these days). But I'm not sure anyone needs a textbook to draw a handful of rectangles and triangles.

So if you really want to do this, I suggest trying to write a COBOL program that opens a window and draws something simple in it - just a rectangle or something. If you can do that, you're well on the way.

0 Likes
carrfamily Absent Member.
Absent Member.

RE: Theoretically possible to program statistical animation in Micro Focus COBOL?

Could you steer me to a simple COBOL program that opens a window and draws a simple shape, so I can see how it's done? Thanks
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Theoretically possible to program statistical animation in Micro Focus COBOL?

I'm afraid I don't have a suitable example, and don't have time right now to create one.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.