L Scripting language English version

Source: Internet
Author: User

L scripting language is not only support Chinese, I also developed an English version, of course, but the keyword is all replaced with English, in fact L scripting language can support any language, the use of global action registration features, we can transform it ourselves

This is the English version of the mathematical function library and its invocation example

#scplib
#mathmetic Lib

Define:function,get_circumference,radius
Start:function,get_circumference
Compute:expression,ret,2*3.14*radius
show:ret
end:function,get_circumference

Define:function,get_area,radius
Start:function,get_area
compute:expression,ret,3.14* (Radius*radius)
show:ret
End:function,get_area

Define:function,power,num1
Start:function,power
Compute:expression,ret,num1*num1
show:ret
End:function,power

Define:function,square,num1
Start:function,square
Compute:expression,ret,num1*num1
show:ret
End:function,square

Define:function,cube,num1
Start:function,cube
Compute:expression,ret,num1*num1*num1
show:ret
End:function,cube

Define:function,remainder,num1,num2
Start:function,remainder
compute:expression,ret,num1%num2
show:ret
End:function,remainder

Define:function,averagevalue,n1,n2,n3
Start:function,averagevalue
compute:expression,eee, (N1+N2+N3)/3
show:eee
End:function,averagevalue


#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


L Scripting language English version

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.