Gambas/syntax/variables/classes: Difference between revisions

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
current documentation link
class name as a string
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
==Notes==
==Notes==
Object variables seem to be essentially pointers, as in most object-oriented languages. In other words, if you set object A equal to object B (A = B), then change object B, the changes will be reflected in A as well.
Object variables seem to be essentially pointers, as in most object-oriented languages. In other words, if you set object A equal to object B (A = B), then change object B, the changes will be reflected in A as well.
To return the class of an object "X" as a string: <gambas>Object.Class(X).Name</gambas>
==Pages==
==Pages==
* [[/inheritance]]
* [[/inheritance]]
Line 6: Line 8:
==Links==
==Links==
===Official===
===Official===
* [http://gambaswiki.org/wiki/cat/object Object & Class Management] (new)
* newer documentation:
** [http://gambaswiki.org/wiki/doc/object-model The Gambas Object Model]
** [http://gambaswiki.org/wiki/cat/object Object & Class Management]

Latest revision as of 22:57, 2 June 2015

Notes

Object variables seem to be essentially pointers, as in most object-oriented languages. In other words, if you set object A equal to object B (A = B), then change object B, the changes will be reflected in A as well.

To return the class of an object "X" as a string: <gambas>Object.Class(X).Name</gambas>

Pages

Official