gnucobol-users
[Top][All Lists]
Advanced

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

[open-cobol-list] Bindings via perform statement?


From: Patrick
Subject: [open-cobol-list] Bindings via perform statement?
Date: Mon, 15 Apr 2013 13:15:41 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5

Hi Everyone

Just a nutty idea on my lunch break....

Via the call statement we can call programs in other languages. If those other programs are compiled right in with the cobol executable then they can potentially maintain state as global variables and static variables within functions.

With the C program Foo we can call the function Foo-You but the call syntax could get a bit tiresome with many arguments and many of the arguments may even be the same each time. For instance with the Lua language API the first argument to each function is usually a pointer to the Lua state struct, normally called L.

I actual don't want to use Lua right now but there are all sorts of libraries I do.

If each call statement was wrapped in a perform statement, could we don't potentially reduce the typing and make a Cobol-Way binding to a given library?

If this was logical, I wondering if I could even write a binding generator, that would automatically wrap each function.

-Patrick




reply via email to

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