- 授权协议: Public Domain
- 开发语言: C/C++ Basic
- 操作系统: 跨平台
- 软件首页: https://github.com/rollbear/basicpp
- 软件文档: https://github.com/rollbear/basicpp
软件介绍
basicpp 使得今天的 C++ 可以像 80 年代的 BASIC 语言一样的简单。该项目在了 C++ 中实现了简单的 BASIC 仿真。
示例代码:
#include "basic.hpp"
int main()
{
_10: LET X = 1;
_20: LET SUM = 0;
_30: LET DEPTH = 1;
_40: INPUT "Enter a positive number: ", X;
_50: IF X > 0 THEN GOTO _130;
_60: PRINT "By positive, I mean greater than zero. You entered ", X, " which isn't";
_70: GOTO _40;
_80: SUM = SUM + X;
_90: X = X - 1;
_100: IF X > 0 THEN GOSUB _80;
_110: DEPTH = DEPTH * 2;
_120: RETURN;
_130: GOSUB _80;
_140: PRINT "SUM=", SUM, " DEPTH=", DEPTH;
}不足之处:
只支持数值类型变量
要求 C++11 或者更新版本
讨厌的分号
变量必须在使用之前定义
不能在核心模块中使用
不支持很多语言特性,如 PRINT USING 和大多数 I/O
Think Python
Allen B. Downey / O'Reilly Media / 2012-8-23 / GBP 29.99
Think Python is an introduction to Python programming for students with no programming experience. It starts with the most basic concepts of programming, and is carefully designed to define all terms ......一起来看看 《Think Python》 这本书的介绍吧!
