COBOL bridge for NodeJS
- 授权协议: KINDLY
- 开发语言: JavaScript COBOL
- 操作系统: 跨平台
- 软件首页: https://github.com/IonicaBizau/node-cobol
软件介绍
COBOL bridge for NodeJS 可以让你在 Node.js 里面运行 COBOL 代码。
代码示例:
// Dependencies
var Cobol = require("cobol");
// Execute some COBOL snippets
Cobol(function () { /*
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
PROGRAM-BEGIN.
DISPLAY "Hello world".
PROGRAM-DONE.
STOP RUN.
*/ }, function (err, data) {
console.log(err || data);
});
// => "Hello World"
Cobol(__dirname + "/args.cbl", {
args: ["Alice"]
}, function (err, data) {
console.log(err || data);
});
// => "Your name is: Alice"
// This will read data from stdin
Cobol(function () { /*
IDENTIFICATION DIVISION.
PROGRAM-ID. APP.
*> http://stackoverflow.com/q/938760/1420197
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT SYSIN ASSIGN TO KEYBOARD ORGANIZATION LINE SEQUENTIAL.
DATA DIVISION.
FILE SECTION.
FD SYSIN.
01 ln PIC X(64).
88 EOF VALUE HIGH-VALUES.
WORKING-STORAGE SECTION.
PROCEDURE DIVISION.
DISPLAY "Write something and then press the <Enter> key"
OPEN INPUT SYSIN
READ SYSIN
AT END SET EOF TO TRUE
END-READ
PERFORM UNTIL EOF
DISPLAY "You wrote: ", ln
DISPLAY "------------"
READ SYSIN
AT END SET EOF TO TRUE
END-READ
END-PERFORM
CLOSE SYSIN
STOP RUN.
*/ }, {
stdin: process.stdin
, stdout: process.stdout
}, function (err) {
if (err) {
console.log(err);
}
});
// => Write something and then press the <Enter> key
// <= Hi there!
// => You wrote: Hi there!
// => ------------
C程序设计语言
(美)Brian W. Kernighan、(美)Dennis M. Ritchie / 徐宝文、李志译、尤晋元审校 / 机械工业出版社 / 2004-1 / 30.00元
在计算机发展的历史上,没有哪一种程序设计语言像C语言这样应用广泛。本书原著即为C语言的设计者之一Dennis M.Ritchie和著名计算机科学家Brian W.Kernighan合著的一本介绍C语言的权威经典著作。我们现在见到的大量论述C语言程序设计的教材和专著均以此书为蓝本。原著第1版中介绍的C语言成为后来广泛使用的C语言版本——标准C的基础。人们熟知的“hello,World"程序就是由本书......一起来看看 《C程序设计语言》 这本书的介绍吧!
