You can't compile code at runtime, unless you use the virtual machine. However I'm not sure if you need this.
You can pass the instance of a type as a parameter:
If you need any parameters, you can store them in the type.
You can pass the instance of a type as a parameter:
type Enemy field x# field y# end type function HandleMovement(e.Enemy) if e\x < 0 then e\x = 0 end function
If you need any parameters, you can store them in the type.