[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] CVS Update 20061015
From: |
Sergey Kashyrin |
Subject: |
Re: [open-cobol-list] CVS Update 20061015 |
Date: |
Tue, 17 Oct 2006 12:35:22 -0400 |
Bob,
WOW !
That's the shot ! And none of the cobol85 etc tests showed this !
That would be a "fastfix". I'm not sure about other implications but for now it
will work.
compiler patch: cobc/typeck.c
*** typeck.c.old 2006-10-15 04:50:48.000000000 -0400
--- typeck.c 2006-10-17 12:25:38.000000000 -0400
***************
*** 620,626 ****
if (CB_LITERAL_P (sub)) {
int n = cb_get_int (sub);
! if (n < p->occurs_min || n > p->occurs_max) {
cb_error_x (x, _("Subscript of '%s' out of bounds: %d"),
name, n);
}
--- 620,626 ----
if (CB_LITERAL_P (sub)) {
int n = cb_get_int (sub);
! if (n < 1 || n > p->occurs_max) {
cb_error_x (x, _("Subscript of '%s' out of bounds: %d"),
name, n);
}
runtime patch (for runtime index checking in "-debug" mode): libcob/common.c
*** common.c.old 2006-10-14 08:19:54.000000000 -0400
--- common.c 2006-10-17 12:28:31.000000000 -0400
***************
*** 1236,1242 ****
cob_check_subscript (const int i, const int min, const int max, const char
*name)
{
/* check the subscript */
! if (i < min || max < i) {
COB_SET_EXCEPTION (COB_EC_BOUND_SUBSCRIPT);
cob_runtime_error ("Subscript of '%s' out of bounds: %d", name, i);
cob_stop_run (1);
--- 1236,1242 ----
cob_check_subscript (const int i, const int min, const int max, const char
*name)
{
/* check the subscript */
! if (i < 1 || max < i) {
COB_SET_EXCEPTION (COB_EC_BOUND_SUBSCRIPT);
cob_runtime_error ("Subscript of '%s' out of bounds: %d", name, i);
cob_stop_run (1);
Regards,
Sergey
----- Original Message -----
From: "Robert Sherry" <address@hidden>
To: "'Roger While'" <address@hidden>; <address@hidden>
Sent: Tuesday, October 17, 2006 12:14 PM
Subject: Re: [open-cobol-list] CVS Update 20061015
I down loaded and built the latest release of the Open Source COBOL
Compiler. I would expect the following program to compile:
IDENTIFICATION DIVISION.
PROGRAM-ID. prog.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 G.
02 X PIC X OCCURS 4 TO 6 TIMES DEPENDING ON N.
01 N PIC 9 VALUE 4.
PROCEDURE DIVISION.
DISPLAY X(3).
STOP RUN.
However, I get a compile time error stating that the subscript for X is
wrong.
Bob Sherry
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of Roger
While
Sent: Sunday, October 15, 2006 5:57 AM
To: address@hidden
Subject: [open-cobol-list] CVS Update 20061015
CVS updated.
Tarball (AKA Prerelease) at :
http://ww.sim-basis.de/open-cobol-0.33.tar.gz
Too many things changed to list here.
See the ChangeLog files in the top-level
and sub-directories (cobc, libcob, config, bin, tests)
Roger
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list