Skip to content

Commit cd5d6ce

Browse files
committed
Merge remote-tracking branch 'origin/pullfrog/1054-add-cobol-language-support' into pr-1055
2 parents da57767 + f3dffa5 commit cd5d6ce

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎src/livecodes/templates/starter/cobol-wasm-starter.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const cobolWasmStarter: Template = {
2222
2323
<script>
2424
// set initial input
25-
livecodes.cobol.input = "0";
25+
livecodes.cobol.input = "-1";
2626
2727
addEventListener('load', async () => {
2828
const button = document.querySelector("#counter-button");
@@ -88,12 +88,14 @@ IDENTIFICATION DIVISION.
8888
PROGRAM-ID. COUNTER.
8989
DATA DIVISION.
9090
WORKING-STORAGE SECTION.
91-
01 WS-COUNT PIC 9(3).
91+
01 WS-COUNT PIC S9(3).
92+
01 WS-OUT PIC ZZZ9.
9293
PROCEDURE DIVISION.
9394
DISPLAY "COBOL"
9495
ACCEPT WS-COUNT
9596
ADD 1 TO WS-COUNT
96-
DISPLAY WS-COUNT
97+
MOVE WS-COUNT TO WS-OUT
98+
DISPLAY FUNCTION TRIM(WS-OUT)
9799
STOP RUN.
98100
`.trimStart(),
99101
},

0 commit comments

Comments
 (0)