LISp-Miner Control Language Basics
For a graphical overview see LMCL Diagrams
. For script
examples see LMCL Demo Examples
Syntax and naming conventions
For a general overview of the scripting language syntax see Lua
pages and the
LMCL follows Lua naming conventions as far as they
were identified in Lua examples. Names of variables,
namespaces, functions, methods and named-function-parameters start with lower letters.
Only the names of classes, theirs properties and predefined global constants start
with capital letters. Names compounded from two or more words follow the
"camel" convention of starting capital letters for the second and next words.
Set and Get Functions
There are unified name prefixes of
for functions reading and setting properties of objects. The setter
function has the only one unnamed parameter of the same type as the property
it is modifying, so is the return type of the corresponding getter
dataColumn.getName() -- returns column name as string
attribute.setName( "age") -- changes name of the attribute
Functions and methods parameteres
Unnamed parameters for function calls are used only for setter
functions and few other simple functions (mainly the logging functions from
namespace). In all other cases the named
parameters are used for enhancing readability and clarity of the script codes.
A simplified Hungarian notation is used to identify four basic types of named parameters.
nTaskSubTypeCode -- an integer number expected
dParamP -- a floating-point number (double precision) is expected
bForceRunFinished -- a boolean value is expected
pParentGroup -- a reference to an LMObject is expected
A special function name prefix
is used to identify
functions or methods returning an array of objects as a
functions allow to pass
an optional parameter to filter only some objects from the internal array (eg.
only tasks of a given type).
taskArray= lm.tasks.prepareTaskArray( nTaskSubTypeCode= lm.codes.TaskSubType.CFMiner)
Another prefix of
is used to identify functions looking-up
an object in an internal array by one of its unique properties (usually by the
object properties). The identifier is passed as
a named parameter -- see reference to available
dataColumn= dataTable.findDataColumn( name= "District")
task= lm.tasks.findTask( nID= 7)
In some cases a direct manipulation of property value is possible using the
property name -- see class references. Properties of type
are distinguished by suffix
nCount= dbtable.RecordCount -- Reads value of the RecordCount property (using the getRecordCount method internally)
attribute.Note= "A text description" -- Sets value of the Note property (using the setNote method internally)
LISp-Miner subsystems identification
To better understand the names of classes, you should become familiar with the
LISp-Miner subsystems two-letter identifiers.
||4ft-Miner related classes, or classes for 4ft-cedents and literals used in all other modules too
||CF-Miner related classes
||KL-Miner related classes
||SD4ft-Miner related classes
||SDCF-Miner related classes
||SDKL-Miner related classes
||ETree-Miner related classes
||MCluster-Miner related classes
Member-access through dot
The important syntax feature to remember is that members of namespaces or properties and methods of objects are accessed
by the the dot '.'.
lm.log( ... )
lm.metabase.open( ... )
The basic namespace for all the LISp-Miner related functions and classes is
namespace. It is moreover subdivided
into additional namespaces, a complete list of them could be seen in the
navigation bar in the left part of this page.
LISp-Miner objects are available as instances of
objects with meta-tables
to keep necessary information about properties
and methods of each class. A complete list of all classes is also on the left
of this page.
Pre-defined constans were created for LISp-Miner internal types. They are
grouped in the
namespace and there is also a complete list with descriptions