AutoScript
{..............calling a function example............}
lib {....required if there are more procedures and functions declared}
public {....required if there are more procedures and functions declared}
locals {....or globals!}
a = 10
a = Input("Input Form","a value",a)
res = myfunct(a)
call message("res=",res)
return {...do not continue execution!}
{======================== myfunct =======================}
fun myfunct ( val )
call message("x=",x)
x = 0
for i = 1 to val
x = x + 1
next
call message("x=",x)
result = x {......the returned value always as "result"}
end
{...end of function}