L脚本语言英文版
L脚本语言不是仅支持中文,我还开发了一个英文版,当然,只不过是关键字全都替换为英文了,其实L脚本语言可以支持任意语种,利用全局动作注册的特性,我们自己可以对它进行改造
这是英文版的数学计算函数库及其调用的例子
#scplib#mathmetic lib
define:function,get_circumference,radius
start:function,get_circumference
compute:expression,ret,2*3.14*radiusend:function,get_circumference
show:ret
define:function,get_area,radius
start:function,get_area
compute:expression,ret,3.14*(radius*radius)end:function,get_area
show:ret
define:function,power,num1
start:function,power
compute:expression,ret,num1*num1end:function,power
show:ret
define:function,square,num1
start:function,square
compute:expression,ret,num1*num1end:function,square
show:ret
define:function,cube,num1
start:function,cube
compute:expression,ret,num1*num1*num1end:function,cube
show:ret
define:function,remainder,num1,num2
start:function,remainder
compute:expression,ret,num1%num2end:function,remainder
show:ret
define:function,averagevalue,n1,n2,n3
start:function,averagevalue
compute:expression,eee,(n1+n2+n3)/3end:function,averagevalue
show:eee
#scp
import:library,D:\ScriptEngine\Scripts\en\testscript_numeric_lib.scp
define:int,rid2,10
define:int,rid,100
define:int,number1,8
define:int,number2,9
define:int,number3,100
show:"now calc circumference of circle"
call:function,get_circumference ,rid
show:"now calc area of circle"
call:function,get_area,rid2
call:function,power,number1
call:function,remainder,number2,number1
call:function,cube,number1
call:function,averagevalue,number1,number2,number3
call:function,averagevalue,100,200,300
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。