- Joined
- Nov 2, 2004
- Messages
- 1,989
Is there a way to do something like this?
edit: This example would cause an infinite loop, but it's just an example. Point is, is there a way to "pre-declare" (I don't know the proper term for this) a method in a struct?
edit2: ok nevermind, apparently the order of the methods doesn't matter, you can always call on any member. please delete lol
JASS:
struct A
private method methodA takes real x returns nothing
private method methodB takes nothing returns nothing
call methodA(0)
endmethod
private method methodC takes nothing returns nothing
call methodB()
endmethod
private method methodA takes real x returns nothing
call methodC()
endmethod
endstruct
edit: This example would cause an infinite loop, but it's just an example. Point is, is there a way to "pre-declare" (I don't know the proper term for this) a method in a struct?
edit2: ok nevermind, apparently the order of the methods doesn't matter, you can always call on any member. please delete lol
Last edited: