Can Handler Know What Params It Should Have

Pierre Sahores sc at sahores-conseil.com
Tue Feb 2 12:35:39 EST 2016


Bernard,

It’s the way most AI programs are running (functional programming + lambda-calcul => 24/7 enabled recursive call-backs)

1.- as a startup example :

on idle
 if var1 and var2 is «  » then
	get function function_1
else
	get function function_n
end if
end idle

or more simple :

on idle
	get function function_1(var1, var2)
end idle

function function_1
	…
end function_1

…


function function_n
	…
end function_n

2.- where idle can be replaced with a first direct call (on startup, on opencard,…) to function_1 as long as function_n ends up with :

wait 10
send function_1 to me in 10 ticks — garbage collector

HTH,


> Le 2 févr. 2016 à 17:05, Bernard Devlin <bdrunrev at gmail.com> a écrit :
> 
> I know the params can be called to find out what parameters were passed to
> the handler when it is called. However, I'm wondering if a handler has a
> way of knowing what parameters it had at the time it was defined.
> 
> I don't think so.
> 
> Regards
> Bernard
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

--
Pierre Sahores
mobile : 06 03 95 77 70
www.sahores-conseil.com





More information about the use-livecode mailing list