From 9f30f45774fffecb4a4cddc78c5df054596c125c Mon Sep 17 00:00:00 2001 From: Valk Richard Li <48872266+ValKmjolnir@users.noreply.github.com> Date: Fri, 11 Jun 2021 15:28:25 +0800 Subject: [PATCH] Update README.md --- README.md | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 16f2c3f..8fe89fc 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Nasal Script Language +[TOC] + ## Introduction [Nasal](http://wiki.flightgear.org/Nasal_scripting_language) is a script language that used in [FlightGear](https://www.flightgear.org/). @@ -50,12 +52,13 @@ Input this command to run scripts directly: > ./nasal filename -Use these commands to get some information of interpreter: +Use these commands to get version of interpreter: -> ./nasal -v -> ./nasal -version -> ./nasal -h -> ./nasal -help +> ./nasal -v | -version + +Use these commands to get version of interpreter: + +> ./nasal -h | -help ## Parser @@ -307,21 +310,14 @@ var f=func(x,y,z,dynamic_para...) ### operators ```javascript -1+2; -1-2; -1*2; -1/2; +1+2-1*2/1; 'str1'~'str2'; (1+2)*(3+4) 1+1 and 0; -1+2*3 or 0; -1<0; -1>0; -1<=0; -1>=0; -1==0; -1!=0; +1<0 or 1>0; +1<=0 and 1>=0; +1==0 or 1!=0; -1; !0; @@ -506,8 +502,7 @@ At last,warp the '__builtin_std_cout' in a nasal file: ```javascript var print=func(elements...) { - __builtin_std_cout(elements); - return nil; + return __builtin_std_cout(elements); }; ```