ThelopWiki

Wards Wiki Pages / Thelop Word Class

Any word from the ThelopLanguage? works in one ore more ThelopWordClass?'es. Currently there are four words classes: Objects, Actions, Properties and Modifiers':

* Objects (O) are the main building blocks of the ThelopLanguage?. Examples are "File", "Text", "Window" or "Rect". Any ThelopName? must start with an object word (e.g. F'ileOpen or WindowSetTitel). Usually English nouns are used as object words, sometimes in an abbreviated form (e.g. "Rect" instead of "Rectangle") . It is common that objects are parts (properties) of other objects, so many object words work also as properties (e.g. WindowGetRect). Sometimes they even work as modifiers (e.g. "File" in "T'extFileOpen" ).

* Actions (A) tell us about the operations that are performed on the objects. Examples are: "Create", "Clear", "Cpy" or "Get". Any THELOP function name must contain at least one action words (e.g. W'indowOpenTitleRect or RectGetWidthHeight). Usually English verbs are used as action words. Action words never work in other ThelopWordClass?'es.

* Properties (P) are considered parts of objects. Examples are: "Color", "Width" or "Size". They are accessed by the special words "Get, "Set" or "Ret" (e.g. F'ileRetSize, WindowGetClientRect or RectGetWidthHeight). Properties sometimes work as modifiers (e.g. "Width" in WindowGetBorderWidth) but only rarely as objects (e.g. "Color" in C'olorSetSaturation).

* Modifiers (M) change the meaning of words or names. They are perhaps the most interesting words in the ThelopLanguage?. They may change the meaning of actions (e.g. "Last" in S'trFindChrLast), they may eliminate the need for an explicit object reference (e.g. compare WindowClose(w) and WindowCloseAll()) or indicate the data type or unit used (e.g. StrRetDouble or RectSetWidthInch). There are even global modifiers that influence the meaning of the function as a whole. A modifier is always appended to the object, property or name it influences (e.g. "Cm" in CarRetHeightCm() and not C'arRetCmHeight()).

More examples can be found on the ThelopWordExample?s page.

THELOP function names are built from ThelopWord?'s according to ThelopNamePattern?s. These patterns are written using the single character abbreviations of the ThelopWordClass?es (e.g. the pattern "OAO" correspond to FileCpyString(filename,string), image=ImageCreateFile(filename) or P'rinterDrawImage(x,y,image)).


See also: LanguageOrientedProgramming, ThelopLanguage?, ThelopWordExample?, ThelopNameExample?, ThelopDictionary
CategoryThelop?
 
© ThelopWiki Community zuletzt geändert am September 22, 2003