Re: [Gambas-user] module/comp how to made like gambas normal
Brought to you by:
gambas
|
From: Tobias B. <ta...@gm...> - 2017-10-15 18:59:51
|
On Sun, 15 Oct 2017, PICCORO McKAY Lenz wrote: > i want to make a component that their rutines can be uses directly and not > "module.subrutine(arg)" i like th use as "rutine(arg)" > > hoq cab i made that? > AFAIK real routines have to be built into the compiler so you can't add them with just a component. However, you can make a module, say MyFunc, and give it the special _call method [1]. The you can use the module name like a function, i.e. call MyFunc(), and it will call the _call() method. Regards, Tobi [1] http://gambaswiki.org/wiki/cat/special -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk |