ThelopNamePatterns are used to restrict the possible arrangements of
ThelopWords used for
ThelopNames.
The
ThelopNamePatterns are written using the abbreviations for the
ThelopWordClasses: Objects (
O), Actions (
A), Properties (
P) and Modifiers (
M). An appended
+ character means that there may be one or more repetitions of the same word class (
P+ stands for
P,
PP,
PPP ...)
Any object or property word (O or P) may be followed by one or more modifier words (M), that may change the
WordSignature (meaning, corresponding parameters) of the "parent word".
Any complete name may be followed by one or more modifiers that change the meaning of the whole function. These modifiers are called "global modifiers".
A complete name may have a phrase "R
etObject" or "R
etProperty" added, to display what the function returns. If this is obvious, the phrase may be dropped. See:
ThelopRule.
A "basic
ThelopNamePattern" is a pattern with no modifiers. Only basic patterns are listed here. Examples are given with and without added modifiers.
Basic pattern:
OA (O
bjectAction)
used for unary actions.
Examples: S
creenClear(), F
ileDel(filename), W
indowClose(window), I
mageFree(image), W
indowCloseAll(), I
mageCvtColorspaceGray(image)
Basic pattern
OAP+ (O
bjectActionProperties)
typically used for accessing object properties by using the "Set" or "Get" actions.
Examples: F
ileSetSize(filename,size), SystemG
etUserName(pString), I
mageGetWidthHeight(image,pWidth,pHeight), W
indowSetRect(window,rectangle), I
mageGetPixel(image,x,y,pColor),
I
mageGetPixelGray(image,x,y,&pColorGray), W
indowGetChildFirst(window,pChildWindow)
Basic pattern:
OAO (O
bjectActionObject)
used for binary actions.
Examples:
S
trFindChr(string,character), F
ileAppLine(filename,string), I
mageCreateFile(filename), R
ectCmp(rectangle1, rectangle2), P
ointInPoligon(point,poligon), F
ileLockPosSizeRetErr(file,position,size),
Comments: According to
ThelopRule the second object word may be dropped if it is identical to the primary object word ("R
ectCmp" instead of "R
ectCmpRect").
(work in progress...)
See also:
LanguageOrientedProgramming,
ThelopLanguage,
ThelopRule,
ThelopWordExample,
ThelopNameExample,
ThelopDictionary
CategoryThelop