- Author: Stardust D.L.
- Version: 0.1
The REPL environment for ExprSharp.
ExprSharp: A tiny code language based on iExpr.Core.
For more information about ExprSharp, please see Wiki
- Install .Net Core Here
- Download the repl tools Here
- Unzip and get into the diretory, then use the command:
dotnet esi.dll
- Enjoy it.
- How to write codes in ExprSharp? see Wiki For ExprSharp
For example, you can write math expression:
1+2
2**20
math.pi
Or if you want to calculate 20! , you can write:
func{f=(n)=>func{if(n==0){return 1}{return n*f(n-1)}},return f(20)}
Or "paint" a triangle:
for(i=1;i<=21;i+=2){print(" "*((21-i)/2)+"*"*i+" "*((21-i)/2))}
Also you can make the Fibonacci numbers by iterator:
- In command line, it's so long in one line:
func{it=iter{this.current=0,f0:=0,f1:=1,this.next=(_)=>func{this.current=f0+f1,f0=f1,f1=this.current,return this.current<100}},print(list(it))}
- But in a file, it can be clear:
- you just need to use command
now
to set the file name, and userun
to run the file.
- you just need to use command
func{
it=iter{
this.current=0,
f0:=0,
f1:=1,
this.next=(_)=>func{
this.current=f0+f1,
f0=f1,
f1=this.current,
return this.current<100
}
},
print(list(it))
}
For more example, see Wiki For ExprSharp
Items | Description |
---|---|
now <filename> |
change the current file name |
run |
run the code from current file |
view |
view all the variables |
clear |
renew the runtime |
exit |
exit the REPL |
cls |
clear the console |
any codes | execute the code |
- ExprSharp
- CommandLineParser