[solved] udt sub, access 'Me' ?

General FreeBASIC programming questions.
dafhi
Posts: 1335
Joined: Jun 04, 2005 9:51

[solved] udt sub, access 'Me' ?

Postby dafhi » Sep 06, 2011 7:57

Is there a way I can access 'myself' in a udt sub call?

Sub Toon.Init()
ClassStats Toon.Fire
ClassStats Toon.Water
End Sub

[ thanks fxm ]
Last edited by dafhi on Sep 06, 2011 8:11, edited 1 time in total.
fxm
Posts: 9559
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: udt sub, access 'Me' ?

Postby fxm » Sep 06, 2011 8:08

dafhi wrote:Is there a way I can access 'myself' in a udt sub call?

Sub Toon.Init()
ClassStats Toon.Fire
ClassStats Toon.Water
End Sub


Code: Select all

Sub Toon.Init()
  ClassStats This.Fire
  ClassStats This.Water
End Sub

See documentation:
http://www.freebasic.net/wiki/wikka.php?wakka=KeyPgThis

Return to “General”

Who is online

Users browsing this forum: No registered users and 2 guests