defstruct

 

 

Overview

The defstruct macro creates and initializes a new object type {newType} with the specified field names {fieldnames}. There may be one or more field names. The new type created by defstruct can inherit from another object by specifying the include: keyword and the name of the parent object {parentName}.

The defstruct macro results in the following substitution:

(defineStructure newType: include: parentName fieldnames....)

Usage

The defstruct macro and the defineStructure function do exactly the same thing. The defstruct macro is a mechanism for adding user-defined types to the Analytic Information Server workbench. The defstruct function brings the conventional object-oriented paradigm to the Analytic Information Server workbench. The defstruct describes a template for the new type object. The object is not instantiated until the constructor function is invoked. The new type can inherit field names (analogous to OOP properties or members) and methods by using the include: syntax.

 

Syntax

 

Examples

Here are a number of links to Lambda coding examples which contain this instruction in various use cases.

 

Argument Types

Here are the links to the data types of the function arguments.

Structure

Here are also a number of links to functions having arguments with any of these data types.

addMethod append apply binaryInsert
boolean cdr class compareEQ
compareGE compareGT compareLE compareLT
compareNE compare comparison cons
copy count debugDetective defineStructure
defstruct delete dimension display
exportCsv exportSbf exportTab fieldsOf
importCsv importSbf importTab insert
inside integer isAtom isBitVector
isBoolean isBound isByteVector isChar
isCharacter isClass isComplex isDate
isDictionary isDirectory isEqual isError
isFloatVector isIdentical isInside isIntegerVector
isInteger isLambda isMatrix isMember
isMoney isNumberMatrix isNumberVector isNumber
isObjectVector isObject isPair isPcodeVector
isString isStructure isSymbol isText
isType isVector length list
macroReplace makeQuotedList makeStructure map
mapc member money new
number objectToList objectToMatrix objectToNumMatrix
objectToNumVector objectToStructure objectToVector offset
pair parent parse pointer
proprecord putprop refAttributes refValues
ref remProp remove resize
saveObject send setCar setCdr
setLastCdr setq sizeof sort
string super svmRegression type
uniqueInsert vectorFill writelg writeln

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE