Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cobj/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1973,7 +1973,7 @@ static void joutput_cond(cb_tree x, int save_flag) {
}
joutput_indent("(new GetInt() {");
joutput_indent_level += 2;
joutput_indent("public int run(){");
joutput_indent("public int run() throws CobolStopRunException {");
joutput_indent_level += 2;
for (; x; x = CB_CHAIN(x)) {
// 最後の文ならreturn文を書く
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@
*/
package jp.osscons.opensourcecobol.libcobj.common;

import jp.osscons.opensourcecobol.libcobj.exceptions.CobolStopRunException;

/** TODO: 準備中 */
public interface GetInt {
/**
* TODO: 準備中
*
* @return TODO: 準備中
* @throws CobolStopRunException TODO: 準備中
*/
int run();
int run() throws CobolStopRunException;
}
3 changes: 2 additions & 1 deletion tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ misc_DEPENDENCIES = \
misc.src/japanese-char-section-var.at \
misc.src/evaluate-switch.at \
misc.src/fserial-variable.at \
misc.src/file-handler-japanese.at
misc.src/file-handler-japanese.at \
misc.src/perform-until-div.at

EXTRA_DIST = $(srcdir)/package.m4 \
$(TESTS) \
Expand Down
3 changes: 2 additions & 1 deletion tests/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,8 @@ misc_DEPENDENCIES = \
misc.src/japanese-char-section-var.at \
misc.src/evaluate-switch.at \
misc.src/fserial-variable.at \
misc.src/file-handler-japanese.at
misc.src/file-handler-japanese.at \
misc.src/perform-until-div.at

EXTRA_DIST = $(srcdir)/package.m4 \
$(TESTS) \
Expand Down
1 change: 1 addition & 0 deletions tests/misc.at
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ m4_include([japanese-char-section-var.at])
m4_include([evaluate-switch.at])
m4_include([fserial-variable.at])
m4_include([file-handler-japanese.at])
m4_include([perform-until-div.at])
25 changes: 25 additions & 0 deletions tests/misc.src/perform-until-div.at
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
AT_SETUP([PERFORM UNTIL whose condition contains division])

AT_DATA([prog.cbl], [
IDENTIFICATION DIVISION.
PROGRAM-ID. prog.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 CNT PIC 9(4) VALUE 1000.
01 I PIC 9(4) VALUE 1.
PROCEDURE DIVISION.
MAIN.
PERFORM
VARYING I
FROM 1 BY 1
UNTIL I > (CNT + 743) / 744
PERFORM SUB
END-PERFORM
STOP RUN.
SUB.
DISPLAY "HELLO".
])

AT_CHECK([${COBJ} prog.cbl])

AT_CLEANUP