{"id":20008998,"url":"https://github.com/iewnfod/caie_code","last_synced_at":"2026-04-09T14:03:43.791Z","repository":{"id":176594677,"uuid":"658807469","full_name":"iewnfod/CAIE_Code","owner":"iewnfod","description":"An Interpreter for CAIE Pseudocode","archived":false,"fork":false,"pushed_at":"2025-04-07T02:03:42.000Z","size":9228,"stargazers_count":35,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"stable","last_synced_at":"2025-05-04T19:39:52.647Z","etag":null,"topics":["interpreter","programming-language","pseudocode","python3"],"latest_commit_sha":null,"homepage":"https://muyunxi.top/cpc","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iewnfod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":"createchstudio","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://afdian.net/a/iewnfod"]}},"created_at":"2023-06-26T14:27:12.000Z","updated_at":"2025-04-29T13:23:30.000Z","dependencies_parsed_at":"2023-10-15T06:04:09.214Z","dependency_job_id":"25d9c951-830c-47ba-98d2-19ece95a4058","html_url":"https://github.com/iewnfod/CAIE_Code","commit_stats":null,"previous_names":["iewnfod/caie_code"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/iewnfod/CAIE_Code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iewnfod%2FCAIE_Code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iewnfod%2FCAIE_Code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iewnfod%2FCAIE_Code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iewnfod%2FCAIE_Code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iewnfod","download_url":"https://codeload.github.com/iewnfod/CAIE_Code/tar.gz/refs/heads/stable","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iewnfod%2FCAIE_Code/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268074295,"owners_count":24191528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["interpreter","programming-language","pseudocode","python3"],"created_at":"2024-11-13T07:13:33.257Z","updated_at":"2026-04-09T14:03:43.742Z","avatar_url":"https://github.com/iewnfod.png","language":"Python","readme":"# CAIE Code (cpc)\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"./assets/cpc.svg\"\u003e\n\u003cimg src=\"./assets/cpc.svg\" width=\"100\" height=\"100\" alt=\"logo\"\u003e\n\u003c/a\u003e\n\u003ch3 align=\"center\"\u003ethe CAIE Pseudocode Interpreter\u003c/h3\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"./README_zh.md\"\u003e中文\u003c/a\u003e | \u003ca href=\"./README.md\"\u003eEnglish\u003c/a\u003e\n\u003c/p\u003e\n\n## Installation and Update\n\n\u003e [Online Version](https://github.com/createchstudio/caie-code-environment)\n\n### Installation Preliminaries\n\n1. Have `python3` installed on your computer.\n\n\u003e It is suggested to use `pypy3` to achieve the best efficiency.\n\n1. Have `git` installed on your computer. If you do not know what `git` is, see https://git-scm.com/downloads.\n\n\u003e For **macOS** users ensure you installed `Command Line Tools for Xcode`.\n\n3. `cargo` if you want to compile manually\n\n### Installation\n\n0. For **macOS** users, you can install directly using following scripts:\n```shell\ncurl -fsSL https://atcrea.tech/cpc-mac | sh\n```\n\n\u003e For those who want to install with Visual Studio Code as well as its [extension](https://marketplace.visualstudio.com/items?itemName=CreatechStudioShanghaiInc.cpc-interpreter-extension), you can use the following script:\n\u003e ```shell\n\u003e curl -fsSL https://atcrea.tech/cpc-mac | sh -s -- --with-vsc\n\u003e ```\n\n1. For **Windows** users, you can install directly using following scripts:\n```powershell\nirm https://atcrea.tech/cpc-win | iex\n```\n\n\u003e You have to manually install the [extension](https://marketplace.visualstudio.com/items?itemName=CreatechStudioShanghaiInc.cpc-interpreter-extension) for Visual Studio Code.\n\n*For other users...*\n\n1. Clone the project to your computer using\n    `git clone https://github.com/iewnfod/CAIE_Code.git`.\n2. Enter the project folder: `cd CAIE_Code`.\n\n3. The executable programs are in `bin/` folder. You may directly run or consider adding `bin/` to your `PATH`.\n\n4. If you want to compile manually:\n  - **macOS**: run `build.sh`\n  - **Windows**: run `build.ps1`\n\n5. If you want to see the manual page from `man` command, you should consider link the manual file `man/cpc.1` to your `MANPATH`.\n\n    \u003e For example(**Linux**): `sudo ln -f ./man/cpc.1 /your/man/path`.\n\n6. If you cannot execute the complied files, please submit the problems on our [issue page](https://github.com/iewnfod/CAIE_Code/issues).\n\n### Update\n* If you followed the instructions and used `git` or PKG to install `cpc`, you can update easily using `cpc -u`.\n\n* An auto-update feature is introduced after `dc0cd71` to automatically detect updates once a week.\n\n* Otherwise, you should manually re-install the whole project.\n\n## Usage\n\n`cpc [filepath] [options]`\n\nIt runs the entire file if `filepath` is provided, otherwise, it enters playground mode.\n### Options\n\n| Mnemonic | Option | Description |\n| -------- | ------ | ----------- |\n| `-c` | `--config` | To set configs of this interpreter |\n| `-d` | `--document` | To show the official document |\n| `-h` | `--help` | To show the help page |\n| `-k` | `--keywords` | To show all the keywords |\n| `-m` | `--migrate` | To migrate `.p` files to `.cpc` in a specified directory |\n| `-n` | `--notification` | To show notification published by developer (only if this is not expired) |\n| `-p` | `--parse` | To show parse information during running |\n| `-t` | `--time` | To show the time for the script to run |\n| `-u` | `--update` | To update the version |\n| `-v` | `--version` | To show the version of this interpreter |\n| `-gt` | `--get-tree` | To show the tree of the program after being parsed |\n| `-lc` | `--list-configs` | To list all the configs of the interpreter |\n| `-ne` | `--no-error` | To remove all error messages |\n| `-rc` | `--reset-configs` | To reset all the configs of the interpreter |\n| `-init` | `--init-requirements` | To install all dependences |\n\n### Config\n\n- `remote`\n  - `github`: Use GitHub as the update source. This source is always the latest.\n  - `gitee`: Use Gitee as the update source, which might be slower than Github.\n\n- `branch`\n\n  - `stable`: Updates are slow, but the most stable.\n  - `nightly`: Early adopters can try this branch, please actively report the issue.\n  - `dev`: The latest version of CPC may contain many untested functions.\n\n  \u003e This setting needs to be run `cpc -u` once for it to take effect.\n\n  \u003e In a developer mod, your remote will not be changed by config and the branch will be locked in `dev`.\n\n- `auto-update`\n  - `true`：Enable auto update.\n  - `false`：Disable auto update.\n\n- `last-auto-update`\n    All non-negative real numbers are accepted and automatically updated by the system.\n\n- `interval-update`\n    All non-negative integers, in seconds, are accepted as the automatic update interval.\n\n- `recursion-limit(rl)`\n    all integer number as the recursion depth limit of the interpreter.\n\n- `integrity-protection`\n\n    - `true`: Enable integrity protection.\n    - `false`: Disable integrity protection.\n\n    \u003e Integrity Protection prevent any accidental or malicious modification of the interpreter.\n\n    \u003e This protection will be automatically disabled in developer mode.\n\n- `dev`\n\n    - `true`: Enable developer mode.\n    - `false`: Disable developer mode.\n\n- Developer Options\n\n    - `dev.simulate-update`\n      - `true`: Enable simulation updates\n      - `false`: Disable simulation updates\n\n## FAQs\n\n### Import Error\nPlease try to install all Python packages manually using\n`pip install -r requirements.txt`\n\n### Import Error after I manually installed packages\nThe program will automatically detect `pypy3` when available and use it to interpret pseudocode because it has better efficiency.\n\nIf you have `pypy3` installed you should install manually using `pypy3 -m pip install -r requirements.txt`\n\n### Incorrect \\\u003cup\\\u003e, \\\u003cdown\\\u003e, \\\u003cleft\\\u003e, \\\u003cright\\\u003e key actions when in playground mode\nYou should retry `pip install readline` or `pip install gnureadline`.\n\n### OSError when launching\nEnter the directory of this project, and run\n```shell\nrm -rf .cpc_history\ncpc -u\n```\n\n### Other problems?\nIf it still fails after re-installation, please report it to us on the [issue page](https://github.com/iewnfod/CAIE_Code/issues).\n\n\n## Efficiency test\n\n### Test Environment\n- machine: 2020 MacBook Pro\n- processor: Apple M1\n- RAM: 8GB\n- Cores: 8 (4 efficient, 4 performance)\n- OS: macOS 14.1.1 (23B81)\n- Python version: PyPy 3.9.16\n\n### Basic Tests\n- assignment: 12M/s\n```\nDECLARE a : INTEGER\nFOR i \u003c- 1 TO 12000000\n    a \u003c- i\nNEXT i\n```\n\n- explicit conversion and assignment: 7.6M/s\n```\nDECLARE a : STRING\nFOR i \u003c- 1 TO 7600000\n    a \u003c- STRING(i)\nNEXT i\n```\n\n- implicit conversion and assignment: 10M/s\n```\nDECLARE a : STRING\nFOR i \u003c- 1 TO 10000000\n    a \u003c- i\nNEXT i\n```\n\n- print to terminal: 650K/s\n```\nFOR i \u003c- 1 TO 650000\n    OUTPUT i\nNEXT i\n```\n\n### Computation Tests\n- [generating 100k randoms and shell sorting](test/sort_test.cpc): about 3.5s\n\n\n## Standards\n\n### Basic Standards\n\n- use camelCase naming\n- use `.cpc` as the file suffix\n- use `utf-8` encoding\n- all reserved words are in upper case\n- the program is case-sensitive\n- use `//` to comment code\n\n### Features\nMost syntax follows the [pseudocode standard of CAIE](https://www.cambridgeinternational.org/Images/697401-2026-syllabus-legacy-notice.pdf).\n\nHowever, indentation is *suggested but not compulsory*.\n\nEach statement following `CASE` statement must end with a `;`, semicolon.\n\n### Basic Data Types\nThe following items give the `DATATYPE`, its description, and the default value set when defined in brackets.\n\n* `INTEGER` integer, whole number (`0`)\n    ```\n    1\n    2\n    123\n    -123\n    ```\n* `REAL` float-point number (`0.0`)\n    ```\n    1.1\n    0.1\n    -12.1233\n    ```\n* `CHAR` one single character (`''`)\n    ```\n    '1'\n    '!'\n    'd'\n    ```\n* `STRING` string (`\"\"`)\n    ```\n    \"Hello\"\n    \"World\"\n    \"!\"\n    ```\n* `BOOLEAN` boolean (`FALSE`)\n    ```\n    TRUE\n    FALSE\n    ```\n* `DATE` date (current date)\n    ```\n    25/07/2023\n    10/12/2012\n    ```\n    *\n\n`None` is a null datatype returned by some special functions. it should not be used in normal coding and cannot be declared.\n\n### Syntax Definitions\n\n1. Variables and constants\n    * Declare variables\n        ```\n        DECLARE \u003cidentifier\u003e : \u003cdata type\u003e\n        DECLARE \u003cidentifier\u003e : ARRAY [\u003clower\u003e:\u003cupper\u003e, ...] OF \u003cdata type\u003e\n        ```\n    * Declare constants\n        ```\n        CONSTANT \u003cidentifier\u003e = \u003cvalue\u003e\n        ```\n    * Assignment\n        ```\n        \u003cidentifier\u003e \u003c- \u003cvalue\u003e\n        \u003cidentifier\u003e[\u003cindex\u003e, ...] \u003c- \u003cvalue\u003e\n        ```\n      \u003e Pseudocode uses `\u003c-` instead of `=`.\n2. I/O\n    * Input\n        ```\n        INPUT \u003cidentifier\u003e\n        ```\n    * Output\n        ```\n        OUTPUT \u003cvalue\u003e, ...\n        ```\n3. Operations\n    * `+` addition\n    * `-` subtraction\n    * `*` multiplication\n    * `/` division\n    * `\u003e` greater than\n    * `\u003e=` greater than or equal to\n    * `\u003c` smaller than\n    * `\u003c=` smaller than  or equal to\n    * `=` equal (NOT AN ASSIGNMENT STATEMENT)\n    * `\u003c\u003e` not equal\n    * `\u0026` conglomerate strings\n    * `MOD` modulus, find the remainder\n    * `DIV` integer division\n4. Logic operations\n    * `AND`\n    * `OR`\n    * `NOT`\n5. Conditional statements\n    * IF statements\n        ```\n        IF \u003ccondition\u003e THEN\n            \u003cstatements\u003e\n        ENDIF\n\n        IF \u003ccondition\u003e THEN\n            \u003cstatements\u003e\n        ELSE\n            \u003cstatements\u003e\n        ENDIF\n        ```\n    * CASE statements\n        \u003e IMPORTANT: official standards do not have semicolons `;` here\n        ```\n        CASE OF \u003cidentifier\u003e\n            \u003cvalue\u003e : \u003cstatements\u003e;\n            \u003cvalue\u003e : \u003cstatements\u003e;\n            ...\n            OTHERWISE : \u003cstatements\u003e;\n        ENDCASE\n        ```\n6. Loop statements\n    * FOR loop\n        ```\n        FOR \u003cidentifier\u003e \u003c- \u003cvalue\u003e TO \u003cvalue\u003e\n            \u003cstatements\u003e\n        NEXT \u003cidentifier\u003e\n        ```\n    * REPEAT loop\n        ```\n        REPEAT\n            \u003cstatements\u003e\n        UNTIL \u003ccondition\u003e\n        ```\n    * WHILE loop\n        ```\n        WHILE \u003ccondition\u003e\n            \u003cstatements\u003e\n        ENDWHILE\n7. functions\n    * functions without a return value (procedure)\n        ```\n        PROCEDURE \u003cidentifier\u003e ()\n            \u003cstatements\u003e\n        ENDPROCEDURE\n\n        PROCEDURE \u003cidentifier\u003e (\u003cparam\u003e : \u003cdata type\u003e, ...)\n            \u003cstatements\u003e\n        ENDPROCEDURE\n        ```\n    * call a procedure\n        ```\n        CALL \u003cidentifier\u003e ()\n\n        CALL \u003cidentifier\u003e (\u003cvalue\u003e, ...)\n        ```\n    * functions with return values\n        ```\n        FUNCTION \u003cidentifier\u003e RETURNS \u003cdata type\u003e\n            \u003cstatements\u003e\n            RETURN \u003cvalue\u003e\n        ENDFUNCTION\n\n        FUNCTION \u003cidentifier\u003e (\u003cparam\u003e : \u003cdata type\u003e, ...) RETURNS \u003cdata type\u003e\n            \u003cstatements\u003e\n            RETURN \u003cvalue\u003e\n        ENDFUNCTION\n    * call a function with return values\n        ```\n        \u003cidentifier\u003e ()\n\n        \u003cidentifier\u003e (\u003cvalue\u003e, ...)\n        ```\n    * Before the parameters of those sub-routines, you *can* use `BYREF` or `BYVAL` to force the program to pass those parameters by reference or by-value respectively. If no `BYREF` nor `BYVAL` is given, the program will follow the prior parameter. If the program cannot find a clear indication it will, by default pass parameters by value.\n        * If you explicitly define the data types of the array passed `BYVAL` the program will implicitly convert to the designated data type; the program will not convert data types when passed `BYREF`.\n        * `BYREF` : pass the reference of a variable\n        * `BYVAL` : pass a copy of the variable\n8. File I/O\n    * open a file\n        ```\n        OPENFILE \u003cfile path\u003e FOR \u003cfile mode\u003e\n        ```\n    * read a file\n        ```\n        READFILE \u003cfile path\u003e, \u003cvariable\u003e\n        ```\n    * write to a file\n        ```\n        WRITEFILE \u003cfile path\u003e, \u003cdata\u003e\n        ```\n    * close a file\n        ```\n        CLOSEFILE \u003cfile path\u003e\n        ```\n    * locate in the file\n        ```\n        SEEK \u003cfile path\u003e, \u003caddress\u003e\n        ```\n    * File Mode\n        1. `READ`\n        2. `WRITE`\n        3. `APPEND`\n        4. `RANDOM`\n9. Self-defined data types\n    * enumerate type\n        ```\n        TYPE \u003cidentifier\u003e = (\u003cidentifier\u003e, ...)\n        ```\n    * pointer type\n        ```\n        TYPE \u003cidentifier\u003e = ^\u003cdata type\u003e\n        ```\n    * records(classes)\n    \u003e In this case, the program will not check the data types when assigning a variable of this type to another. The program will assign the other variable as the *reference* for this one.\n        ```\n        TYPE \u003cidentifier\u003e\n            \u003cstatements\u003e\n        ENDTYPE\n        ```\n10. Object Oriented Programme\n    * define an object\n        ```\n        CLASS \u003cidentifier\u003e\n            PUBLIC PROCEDURE NEW (\u003cparams\u003e)\n                \u003cstatements\u003e\n            ENDPROCEDURE\n            \u003cstatements\u003e\n        ENDCLASS\n        ```\n    * private or public variable\n        ```\n        PRIVATE \u003cidentifier\u003e : \u003ctype\u003e\n        PUBLIC \u003cidentifier\u003e : \u003ctype\u003e\n        ```\n    * private or public procedure and function\n        ```\n        PRIVATE PROCEDURE \u003cidentifier\u003e (\u003cparams\u003e)\n            \u003cstatements\u003e\n        ENDPROCEDURE\n\n        PUBLIC PROCEDURE \u003cidentifier\u003e (\u003cparams\u003e)\n            \u003cstatements\u003e\n        ENDPROCEDURE\n\n        PRIVATE FUNCTION \u003cidentifier\u003e (\u003cparams\u003e) RETURNS \u003ctype\u003e\n            \u003cstatements\u003e\n        ENDFUNCTION\n\n        PUBLIC FUNCTION \u003cidentifier\u003e (\u003cparams\u003e) RETURNS \u003ctype\u003e\n            \u003cstatements\u003e\n        ENDFUNCTION\n        ```\n    * create an object\n        ```\n        NEW \u003cidentifier\u003e (\u003cvalues\u003e)\n        ```\n\n    \u003e If you do not sign a variable or procedure or function explicitly, it will be public by default.\n\n### Special Syntax of **CPC** Interpreter\n* delete a variable or constant on RAM\n    ```\n    DELETE \u003cidentifier\u003e\n    ```\n* do nothing\n    ```\n    PASS\n    ```\n* import **CPC** files\n    ```\n    IMPORT \u003cexpression\u003e\n    ```\n    \u003e `expression` here should be a string within double quotes.\n    \u003e There is no isolation between the imported file and the main file. Identifiers may collide.\n    \u003e It is suggested to use the [`Import`](scripts/import.cpc) function to import a package instead.\n    ```\n    CONSTANT \u003cidentifier\u003e = Import(\"\u003cpath to import file\u003e\")\n    ```\n\n### Built-in Functions from CAIE Standard\n* `LEFT(ThisString : STRING, x : INTEGER) RETURNS STRING`\n    ```\n    $ LEFT(\"ABCDEFGH\", 3)\n    \"ABC\"\n    ```\n* `RIGHT(ThisString : STRING, x : INTEGER) RETURNS STRING`\n    ```\n    $ RIGHT(\"ABCDEFGH\", 3)\n    \"FGH\"\n    ```\n* `LENGTH(ThisString : STRING) RETURNS INTEGER`\n    ```\n    $ LENGTH(\"Happy Days\")\n    10\n    ```\n* `MID(ThisString : STRING, x : INTEGER, y : INTEGER) RETURNS STRING`\n    ```\n    $ MID(\"ABCDEFGH\", 2, 3)\n    \"BCD\"\n    ```\n* `LCASE(ThisChar : CHAR) RETURNS CHAR`\n\u003e Decrapricated since 2023\n    ```\n    $ LCASE('W')\n    'w'\n    ```\n* `UCASE(ThisChar : CHAR) RETURNS CHAR`\n\u003e Decrapricated since 2023\n    ```\n    $ UCASE('h')\n    'H'\n    ```\n* `TO_UPPER(x : \u003cdatatype\u003e) RETURNS \u003cdatatype\u003e`\n\u003e \u003cdatatype\u003e may be `CHAR` or `STRING`\n  ```\n    $ TO_UPPER(\"hello\")\n    \"HELLO\"\n\n    $ TO_UPPER('a')\n    'A'\n  ```\n* `TO_LOWER(x : \u003cdatatype\u003e) RETURNS \u003cdatatype\u003e`\n\u003e \u003cdatatype\u003e may be `CHAR` or `STRING`\n  ```\n    $ TO_LOWER(\"HELLO\")\n    \"hello\"\n\n    $ TO_LOWER('A')\n    'a'\n  ```\n* `INT(x : REAL) RETURNS INTEGER`\n    ```\n    $ INT(27.5415)\n    27\n    ```\n* `RAND(x : INTEGER) RETURNS REAL`\n    ```\n    $ RAND(87)\n    35.43\n    ```\n* `EOF(file_path : STRING) RETURNS BOOLEAN`\n* `POW(x: REAL, y: REAL) RETURNS REAL`\n* `DAY(ThisDate : DATE) RETURNS INTEGER`\n  ```\n    $ DAY(25/07/2023)\n    25\n  ```\n* `MONTH(ThisDate : DATE) RETURNS INTEGER`\n  ```\n    $ MONTH(25/07/2023)\n    7\n  ```\n* `YEAR(ThisDate : DATE) RETURNS INTEGER`\n  ```\n    $ YEAR(12/12/2005)\n    2005\n  ```\n* `DAYINDEX(ThisDate : DATE) RETURNS INTEGER`\n\u003e Where Sunday = 1, Monday = 2 etc\n  ```\n    $ DAYINDEX(25/03/2024)\n    2\n  ```\n* `SETDATE(day : INTEGER, month : INTEGER, year : INTEGER) RETURNS DATE`\n  ```\n    $ SETDATE(25, 03, 2024)\n    25/03/2024\n  ```\n* `TODAY() RETURNS DATE`\n  ```\n    $ TODAY()\n    25/03/2024\n  ```\n\n### Built-in Functions of this Interpreter\n\u003e These functions are fairly useful, but they are not included in the [CAIE standard](https://www.cambridgeinternational.org/Images/697401-2026-syllabus-legacy-notice.pdf).\n\n* `EXIT(code : INTEGER)`: exit the program with the exit code\n    `code`. Defalt exit code is 0.\n\n* `ROUND(x : REAL, decimalPlace : INTEGER)`: round the\n    float-point number `x` to some decimal place. The default decimal place is 0(to the nearest whole number).\n\n* `PYTHON(code : STRING, *args)` is a Python interface. You can pass any Python statements into `code` and the program will run it in standard Python. the return value of this function is the value of variable `_result` in the Python code.\n\n    Example:\n    ```\n    \u003e DECLARE a : INTEGER\n    \u003e a \u003c- 0\n    \u003e OUTPUT PYTHON(\"_result=a+1\", a)\n    1\n    ```\n    \u003e if the Python code does not assign a value to `_result`, the function will return `None`.\n    \u003e you *must* pass all variables used in the Python code in `*args`, otherwise, it will not run correctly.\n\n* `VARTYPE(v)` is an interface to get the type of `v` and return it as a string.\n\n* `ANY` is a type that used to allow some unknown type data.\n\n* For more non-official scripts, please see [scripts](./scripts).\n\n## Targets\n### Version 0.1.x Target\n- [ ] Implement all features provided by [official document](./Pseudocode%20Guide%20for%20Teachers.pdf).\n- [ ] Increase the stability for running to achieve a relatively useable situation.\n### Version 0.2.x Target\n- [ ] Give the kernel a great update and optimization.\n- [ ] Implement a high performance virtual machine to run. (Similar as the solution of Java)\n### Version 0.3.x Target\n- [ ] Allow building into executable binary file.\n### Long-term Targets\n- [ ] Provide more packages for use.\n- [ ] Increase running speed and stability.\n- [ ] Implement bootstrap.\n\n## Sponsors\n\u003ca herf=\"https://1password.com/\"\u003e\n    \u003cimg src=\"https://www.vectorlogo.zone/logos/1password/1password-ar21.svg\" height=\"100\" alt=\"1Password\"\u003e\n\n## Author and Contributors\n\u003ca href=\"https://github.com/iewnfod/CAIE_Code/graphs/contributors\"\u003e\n    \u003cimg src=\"https://contrib.rocks/image?repo=iewnfod/CAIE_Code\"\u003e\n\u003c/a\u003e\n","funding_links":["https://patreon.com/createchstudio","https://afdian.net/a/iewnfod"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiewnfod%2Fcaie_code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiewnfod%2Fcaie_code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiewnfod%2Fcaie_code/lists"}