txlyre 12 小時之前
父節點
當前提交
aa62d09f87
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      qic.c

+ 5 - 0
qic.c

@@ -3966,6 +3966,11 @@ const char *STD[][2] = {
      "header `#ifdef _WIN32`\n"
      "include `Windows.h`\n"
      "header `#endif`\n"
+     "func system(s) {\n"
+     "  if type(s) != \"string\"\n"
+     "    throw \"expected first argument to be: string, but got: \" + type(s)\n"
+     "  inline `return qi_make_number(state, system(qi_get(state, \"s\")->value.string))`"
+     "}\n"
      "func getenv(n) {\n"
      "  if type(n) != \"string\"\n"
      "    throw \"expected first argument to be: string, but got: \" + "