File tree Expand file tree Collapse file tree 5 files changed +38
-7
lines changed
libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/data Expand file tree Collapse file tree 5 files changed +38
-7
lines changed Original file line number Diff line number Diff line change @@ -475,11 +475,7 @@ public int getSign() {
475475 if (attr .isFlagSignSeparate ()) {
476476 return value == 0x2b ? 1 : -1 ;
477477 } else {
478- if (0x30 <= value && value <= 0x39 ) {
479- return 1 ;
480- }
481- if (value == 0x20 ) {
482- this .getDataStorage ().setByte (p , (byte ) 0x30 );
478+ if (value == 0x20 || (0x30 <= value && value <= 0x39 )) {
483479 return 1 ;
484480 }
485481
Original file line number Diff line number Diff line change @@ -223,7 +223,8 @@ misc_DEPENDENCIES = \
223223 misc.src/file-handler-japanese.at \
224224 misc.src/perform-until-div.at \
225225 misc.src/search-occurs-depending.at \
226- misc.src/fix-subtract.at
226+ misc.src/fix-subtract.at \
227+ misc.src/display-numeric-NUMERIC-class.at
227228
228229EXTRA_DIST = $(srcdir ) /package.m4 \
229230 $(TESTS ) \
Original file line number Diff line number Diff line change @@ -762,7 +762,8 @@ misc_DEPENDENCIES = \
762762 misc.src/file-handler-japanese.at \
763763 misc.src/perform-until-div.at \
764764 misc.src/search-occurs-depending.at \
765- misc.src/fix-subtract.at
765+ misc.src/fix-subtract.at \
766+ misc.src/display-numeric-NUMERIC-class.at
766767
767768EXTRA_DIST = $(srcdir ) /package.m4 \
768769 $(TESTS ) \
Original file line number Diff line number Diff line change @@ -53,3 +53,4 @@ m4_include([file-handler-japanese.at])
5353m4_include([perform-until-div.at])
5454m4_include([search-occurs-depending.at])
5555m4_include([fix-subtract.at])
56+ m4_include([display-numeric-NUMERIC-class.at])
Original file line number Diff line number Diff line change 1+ AT_SETUP([DISPLAY numeric after NUMERIC class testing])
2+
3+ AT_DATA([prog.cbl], [
4+ IDENTIFICATION DIVISION.
5+ PROGRAM-ID. prog.
6+ DATA DIVISION.
7+ WORKING-STORAGE SECTION.
8+ 01 N-REC.
9+ 03 N-VAL PIC 9.
10+ PROCEDURE DIVISION.
11+ MAIN-PROC.
12+ *************************************************************
13+ MOVE SPACE TO N-REC.
14+ DISPLAY "N-VAL: '" N-VAL "'".
15+
16+ IF N-VAL NUMERIC
17+ DISPLAY "N-VAL is numeric"
18+ ELSE
19+ DISPLAY "N-VAL is not numeric"
20+ END-IF.
21+
22+ DISPLAY "N-VAL: '" N-VAL "'".
23+ ])
24+
25+ AT_CHECK([${COBJ} prog.cbl])
26+ AT_CHECK([java prog], [0],
27+ [N-VAL: ' '
28+ N-VAL is not numeric
29+ N-VAL: ' '
30+ ])
31+
32+ AT_CLEANUP
You can’t perform that action at this time.
0 commit comments