Calling an inline function (y_inline)?
#1

Stupid question, but how?

PHP код:
function MainFunction() {
    for (new 
ii<SOME_THINGi++) {
        
//I want to call SomeFunction here
        
SomeFunction(); // Not working
    
}
    
inline SomeFunction() {
        print(
":)");
    }

Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
You can’t quite do that. y_inline assumes that you are always passing the function as a parameter somewhere else. The best you can do is:

Код:
Looper(Func:function<>)
{
    for (new i = 0; i != SOME_THING; ++i)
    {
        @.function();
    }
}

main()
{
    inline SomeFunction()
    {
    }
    Looper(using inline SomeFunction);
}
Oh, okay, thanks! I just want to keep my code way too clean sometimes I do stupid things, but at least I know this is not possible.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)