gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] PASSTHROUGH experiment


From: Patrick
Subject: [open-cobol-list] PASSTHROUGH experiment
Date: Thu, 07 Feb 2013 10:56:11 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

Hi Everyone

So for 8 years I have been teaching myself to program in the evenings after the kids go to bed(I service spectrometers in the day) and for 8 years I have been littering the internet with stupid questions. I have failed and failed and failed but I have also learned quite a bit in the process.

So I have been looking at the OC source code and I am very excited. All the C books I have read seem to make sense now and all the compiler books seem to be making sense now too.

It will take me another month of evenings to understand the source code but I can see it is built from standard components like Autotools, Flex and Bison, there is lot of documentation to help outside of the OC project.

I was investigating gobject introspection in order to write a GTK binding but now I have another idea. What about modifying open Cobol itself to pass through certain variables directly to C skipping the normal checks an stuff.

So lets say that there is a C library that has the function POO and I want to pass the value 2 and a user defined C type FOO. Right now there is no way to represent FOO in OC or it is difficult.

What about something like this:

05 FOO PIC PASSTHROUGH .

or if the C library uses some crazy name, a way to rename it on the Cobol side but emitted correctly on the C side

05 crazy PIC PASSTHROUGH VALUE SomeCrazyNameInC.


Aside from modifying Cobol outside of the standard does anyone see any issues with this approach?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]