Here is an excerpt from the wikipedia article on Object Oriented Programming:
Quote:In programming languages an object is the composition of nouns (like data such as numbers, strings, or variables) and verbs (like actions, such as functions).
An object oriented program may be viewed as a collection of interacting objects, as opposed to the conventional model, in which a program is seen as a list of tasks (subroutines) to perform. In OOP, each object is capable of receiving messages, processing data, and sending messages to other objects. Each object can be viewed as an independent "machine" with a distinct role or responsibility. Actions (or "methods") on these objects are closely associated with the object. For example, OOP data structures tend to "carry their own operators around with them" (or at least "inherit" them from a similar object or class)...
The REMOVE "function" (or "command", or "method" if you prefer), is inherited from the most primitive of objects... as such, it can be applied to nearly anything (certainly any ITEM, CHAR (both NPC and Player), and possibly even more esoteric stuff like REGIONS (although I've never tried that sort of thing...) Using "dot notation" you can can cause the REMOVE to act on the referenced object... for example:
SRC.REMOVE
ACT.REMOVE
SRC.FINDLAYER.layer_hand1.UID.REMOVE
etc... or you can pass arguments to it and cause it to affect something else entirely... as in:
REMOVE SRC
REMOVE ACT
REMOVE <SRC.FINDLAYER.layer_hand.UID>
The wiki article goes on to say this:
Quote:...Objects can be thought of as encapsulating their data within a set of functions designed to ensure that the data are used appropriately, and to assist in that use. The object's methods typically include checks and safeguards specific to the data types the object contains...
An example of a safeguard that sphere has implemented in the REMOVE method is the protection of player CHAR objects... to remove a Player CHAR, the last argument of REMOVE must be a 1, as in:
SRC.REMOVE 1
or
REMOVE <SRC> 1
Quote:ok, so no arguments after the remove, remove should be left side, not right. thx man
There isn't really any difference, from a style perspective using SRC.REMOVE is a more "object oriented" way of writing your code... but there is also something to say for code readability, so in some cases it might be easier to "read" your code if you use the other style of passing an argument to the function/method.