QLTYE

From Esolang
Jump to navigation Jump to search
This is the english version of User:PrySigneToFry/Silicon_dioxide_in_a_polypropylene_box/QLTYLang.
This page will keep update with the original page.

QLTYLang is an advanced language. It combined User:LynChern's "xxx-lang"'s first draft and the charasterics of 中文(简体,中国大陆) and a language The Second Coming created by PSTF (是的我并不是PSTF本人).

Examples

(ps. why put examples first?)

Hello, World!

输出 『Hello, World!』

Numeric machine

定义 x 为 输入
x 为 整型
x 为 向下取整(绝对值(x))
如果 x 等于 0 执行:
    只要 真 执行:
        输出 0
    没了
否则 执行:
    重复执行 x 次:
        输出 x
    没了
没了

Basic information

In the default circumstance, QLTYLang supports alll characters from printable ASCII (with space and \n) and all characters from 《通用规范汉字表》.

You may choose which chaaracter set(s) QLTYLang would support on installation. Normally, QLTYLang would support these sets:

  • Default: printable ASCII and all characters from 《通用规范汉字表》 (except traditional characters/abnormal characters)
  • European: printable ASCII+ISO-8859-1 and all characters from
  • Unicode: All "printable Unicode"

We use GB18030 by default, but you may choose other encodings like UTF-8.

QLTYLang code is made up by 3 parts:

  • keywords
  • identifiers
  • literals

Keywords

Keywords have important meaning in programming languages. They can't be used as identifiers.

Usage of some common keywords are shown below:

如果 condition 执行:
    # input code here
没了
只要 condition 执行:
    # input code here
没了
重复执行 n 次:
    # input code here that will be repeated n times
没了

对于 iterable 的 item 执行:
    # input code here that will be applied on ever item of iterable
没了