类似C的脚本语言 little-lang

码农软件 · 软件分类 · 脚本编程语言 · 2019-03-04 12:28:28

软件介绍

little-lang 是一种静态类型的,类似C的脚本语言。

特征:

  • 与C语言语法相似

  • Structs, lists, arrays, hashes

  • Perl 的正则表达式: buf =~ /.*foo/, I/O: while (buf = <>)

  • 没有内存管理(引用计数)

  • 编译到Tcl的字节代码,little-lang可以调用的Tcl,TCL可以调用little-lang

  • 完全访问Tcl的运行和库

  • 完全访问Tk的图形工具包

示例:

/* trivial grep implementation */
int
main(string argv[])
{
    string buf, regexp;
    int    ret = 1; // not found is default
    
    unless (regexp = argv[1]) die("usage: grep regexp [files]");
    undef(argv[1]); // left shift down the args

    /*
     * Example perl goodness, the iterate through files and regexp
     */
    while (buf = <>) {
    if (buf =~ /${regexp}/) {
        puts(buf);
        ret = 0;
    }
    }
    return (ret);
}

安装

在 Linux 和 Windows 中, 一个 make install 将会在 /usr/local/bin 中安装 L 和 L-gui (可以被L_INSTALL_DIR=$DIR覆盖)

警告:如果你的在 /usr/ local 安装了 Tcl / Tk8.6版,执行make install会影响你的安装。

对于 OS X,little-lang 的安装方法也是一样的,但L-GUI应用程序包将被复制到默认在 /Applications 中的 LGUI_OSX_INSTALL_DIR

本文地址:https://www.codercto.com/soft/d/603.html

Hackers

Hackers

Steven Levy / O'Reilly Media / 2010-5-30 / USD 21.99

This 25th anniversary edition of Steven Levy's classic book traces the exploits of the computer revolution's original hackers -- those brilliant and eccentric nerds from the late 1950s through the ear......一起来看看 《Hackers》 这本书的介绍吧!

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具