' inner function example
' oxygen, old example
'
uses console
printl "ok"
'---------------------------
function myfun(int k) as long
'===========================
local int v,a,c
static int b
a=k
c=20000
b=4
printl "ok1"
'function abc(int k) as long = k*20 ' doesn't work
function abc(int k=k*20) as long
int a
'--------------------- //
'print str abc a ' error
'--------------------- //
end function
function abc(int k) as long (function=10+k*10)
'--------------------- //
'print str abc a ' error
'--------------------- //
function abc(byval v as long) as long (local c=13 : function=k*3+b+c )
'--------------------- //
'print str abc a ' error
'--------------------- //
function f(int k) as long
(
local int c=17
function=c+k*3
)
function=0
end function
printl "ok2"
print myfun(1)
wait
sub scrolls(v$,v%,y%,yo%,x%,xo%)
shared fcol%,bcol%
m%=1
call wordval(v$,m%,v%)
call wordval(v$,m%,y%)
call wordval(v$,m%,yo%)
call wordval(v$,m%,x%)
call wordval(v$,m%,xo%)
call word(v$,m%,w$):if lw% then fcol%=val(w$)
call word(v$,m%,w$):if lw% then bcol%=val(w$)
end sub
Page created in 0.148 seconds with 11 queries.