Passing Object Type to function?
Blitz3D Forums/Blitz3D Beginners Area/Passing Object Type to function?
| ||
How does one pass an object type to a function? For some strange reason, I can not figure this out. For example: type foo field bUp end type for i=1 to 5 myfoo.foo = new foo myfoo\bUp = FALSE next For myfoo.foo = Each foo Wiggle(???); What do I pass here? myfoo, myfoo.foo doesnt work next Function Wiggle(Objtype) Do something with this ObjType End function Thanks in advance! P-Q4 |
| ||
Function Wiggle(this.foo) this\bUp = this\bUp + 1 End Function |
| ||
don't forget, you can return the object as wellFunction newWiggle.wiggle(a) w.wiggle=new wiggle w\a=a return w End Function matt But |