Passing Object Type to function?

Blitz3D Forums/Blitz3D Beginners Area/Passing Object Type to function?

JoeRetro(Posted 2003) [#1]
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


morduun(Posted 2003) [#2]
Function Wiggle(this.foo)
  this\bUp = this\bUp + 1
End Function



Rimmsy(Posted 2003) [#3]
don't forget, you can return the object as well

Function newWiggle.wiggle(a)
  w.wiggle=new wiggle
  w\a=a 
  return w
End Function



matt
But