|
From: | Michael Potter |
Subject: | Re: [Bug-GnuCOBOL] Bug-GnuCOBOL Digest, Vol 17, Issue 5 |
Date: | Wed, 4 Jul 2018 22:40:44 -0400 |
Hi Marty,
I'll answer bottom up.
The source doesn't say END FUNCTION, it misses the I.
Concerning the dynamic module load, I guess that using COB_PRE_LOAD=update will work and that also renaming it to UPDATE.so will make it work without pre loading.
To integrate the function in the compiler: add it to reserved.c, depending on special parameters checking with a new token (in this case also change parser.y) or a generic existing one. Just follow the existing ones as sample.
Then add the runtime function in common.c, including it as extern in common.h.
Ideally you've added test cases to tests/testsuite.src before, if not do so now.
Last steps: adding ChangeLog entries and upload the beauty to the patch tracker (currently at SourceForge) or send it to the list.Am 4. Juli 2018 19:12:47 MESZ schrieb Marty Heyman <address@hidden>:Thanks Pat, I’m working with Michail on this. Embedding the function definition in the source works fine. At least on my raspbian system, cobcrun doesn’t seem to recognize the dynamically loadable module (update.so) in the same directory as the test file and reports it can’t find the function.In a related manner, the following reports that the last line contains an unexpected “END” and then complains that there is no END FUNCTION line.IDENTIFICATION DIVISION.FUNCTION-ID. undate.DATA DIVISION.LINKAGE SECTION.01 not-in pic 99999 value 0.01 indate pic 99999.PROCEDURE DIVISION USING indate RETURNING not-in.MOVE indate TO not-in.EXIT FUNCTION.END FUNCTON undate.~—Marty Heyman (Symas)On Jul 4, 2018, at 12:00 PM, address@hidden wrote:
Today's Topics:
1. Re: UNDATE FUNCTION (Patrick)
2. Re: UNDATE FUNCTION (Patrick McCavery)
----------------------------------------------------------------------
Message: 1
Date: Wed, 4 Jul 2018 08:11:39 -0400
From: Patrick <address@hidden>
To: Michael Potter <address@hidden>, address@hidden
Subject: Re: [Bug-GnuCOBOL] UNDATE FUNCTION
Message-ID: <address@hidden>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Michael
This could be added to the runtime in C but you can also add this with
user defined functions, please have a look at these:
http://opencobol.add1tocobol.com/gnucobol/#id575
http://opencobol.add1tocobol.com/guides/GNU%20COBOL%202.1%2023NOV2013%20Programmers%20Guide%20(US%20Letter).pdf
-Pat
[Prev in Thread] | Current Thread | [Next in Thread] |