Re: Forward referencing

new topic     » goto parent     » topic index » view thread      » older message » newer message

ChrisBurch3 wrote:
> 
> Hi
> 
> How much of a problem would it be to re introduce the bug that Rob squashed
> a 
> few years ago for eu 4 - ie calling functions and procedures after they
> have been called? routine _id would still be unaffected, so no present code
> would be broken. It may make includes a bit easier to implement.
> 
> Chris

I don't see the necessity for this. It opens up all sorts of potential bugs.
This would be the proper method of forward referencing (which I use frequently).

integer r_Func2

function Func1( integer i )
    return call_func( r_Func2, {2} )
end function

function Func2( integer i )
    return i * 2
end function
r_Func2 = routine_id("Func2")



Could you post an example of how you could better implement the includes with 
the bug reintrocuced?

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu