diff --git a/README.md b/README.md index b11feb9..87344c0 100644 --- a/README.md +++ b/README.md @@ -112,14 +112,14 @@ You could create project in `Visual Studio` by this way: [__CLICK__](./doc/vs.md First we should learn how to write and run a program using this language, click to see the [__tutorial__](#tutorial). +Use this get version of interpreter: + +> ./nasal + Input this command to run scripts __directly__: > ./nasal filename -Use these commands to get version of interpreter: - -> ./nasal -v | --version - Use these commands to get help(see more debug commands in help): > ./nasal -h | --help diff --git a/doc/README_zh.md b/doc/README_zh.md index 57d2f48..1a865d5 100644 --- a/doc/README_zh.md +++ b/doc/README_zh.md @@ -98,21 +98,17 @@ __`linux/macOS/Unix`__ 平台直接使用make即可: 首先我们要通过[__教程__](#教程)知道这个语言的语法以及如何使用这个解释器来运行nasal程序。 +使用这个命令查看解释器的版本: + +> ./nasal + 输入下面的命令来 __直接__ 执行: > ./nasal filename -下面两个命令可以用于查看解释器的版本: - -> ./nasal -v -> -> ./nasal --version - 下面两个命令可以用于查看帮助(调试器的使用方法可以进入调试模式之后根据提示来查询): -> ./nasal -h -> -> ./nasal --help +> ./nasal -h | --help 如果你的操作系统是 __`Windows`__ 并且你想输出unicode,请保证你的控制台程序的代码页支持utf-8,若不支持,使用下面这个命令启用代码页: diff --git a/lib.nas b/lib.nas index 8621639..8fab0c8 100644 --- a/lib.nas +++ b/lib.nas @@ -428,6 +428,7 @@ var dylib= # open dynamic lib. dlopen: func(libname){ # find dynamic lib from local dir first + libname=(os.platform()=="windows"?".\\":"./")~libname; if(io.exists(libname)) return __dlopen(libname); # find dynamic lib through PATH diff --git a/stl/lib.nas b/stl/lib.nas index 8621639..8fab0c8 100644 --- a/stl/lib.nas +++ b/stl/lib.nas @@ -428,6 +428,7 @@ var dylib= # open dynamic lib. dlopen: func(libname){ # find dynamic lib from local dir first + libname=(os.platform()=="windows"?".\\":"./")~libname; if(io.exists(libname)) return __dlopen(libname); # find dynamic lib through PATH