Hi, Try to add "SYNC" before "binary-short". (See in GnuCOBOL Programmer’s Guide: SYNCRONIZED) And write out the size in COBOL and also in C: display "size of c-out-struct-grp: " function length(c-out-struct-grp) printf("size of mystruct3: %d\n", sizeof(struct mystruct3)); I have this result: size of c-out-struct-grp: 49 size of mystruct3: 52 01: *** begin *** 02: +00004 03: e ╩ Ð■ ö☺ ¨☺ 04: * end * 05: +0000000101 05: +0000000202 05: -0000000303 05: +0000000404 05: +0000000505 Maybe can somebody...
Hi, Try to add "SYNC" before "binary-short". (See in GnuCOBOL Programmer’s Guide: SYNCRONIZED) And write out the size in COBOL and also in C: display "size of c-out-struct-grp: " function length(c-out-struct-grp) printf("size of mystruct3: %d\n", sizeof(struct mystruct3)); I have this result: size of c-out-struct-grp: 49 size of mystruct3: 52 01: *** begin *** 02: +00004 03: e ╩ Ð■ ö☺ ¨☺ 04: * end * 05: +0000000101 05: +0000000202 05: -0000000303 05: +0000000404 05: +0000000505 Maybe can somebosy...
Hi, Try to add "SYNC" before "binary-short". (See in GnuCOBOL Programmer’s Guide: SYNCRONIZED) And write out the size in COBOL and also in C: display "size of c-out-struct-grp: " function length(c-out-struct-grp) printf("size of mystruct3: %d\n", sizeof(struct mystruct3)); I have this result: size of c-out-struct-grp: 49 size of mystruct3: 52 01: *** begin *** 02: +00004 03: e ╩ Ð■ ö☺ ¨☺ 04: * end * 05: +0000000101 05: +0000000202 05: -0000000303 05: +0000000404 05: +0000000505 Maybe can somebosy...
Hi, I think, it would be better to give back the result value not in "returning". The RETURNING clause allows you to specify a numeric data item into which the subroutine should return a numeric value. It is same as with the RETURN-CODE special register. The RETURN-CODE defined as BINARY-LONG SIGNED. These values in RETURN-CODE are by convention used to signify success (usually with a value of 0) or failure (usually with a non-zero value) of the process the program was attempting to perform. You...
Hi, for this there is a bug. It was created many years ago. Functions should handle the parameters similar like CALLs. If somebody doesn't know this bug, then he/she can get errors, where not easy to find out the real problem. If I right remember, this is not the first entry about this problem in the forum. László
Hi, for this there is a bug. It was created for many years ago. Functions should handle the parameters similar like CALLs. If somebody doesn't know this bug, then he/she can get errors, where not easy to find out the real problem. If I right remember, this is not the first entry about this problem in the forum. László
Hi, you can try it with CBL_GC_FORK under linux. Here is an example for this: https://sourceforge.net/p/gnucobol/contrib/HEAD/tree/trunk/samples/shared_mem/ László
PROTHSEARCH: Correct warning: duplicate USING BY REFERENCE item.