NLI: Function: new

Background: NLI, Expressions, Functions
Related: Examples

Description:
The new function creates a new thing in the database to represent desired thing {ie john, mary, etc}.
The last new thing can be referenced by the it function in subsequent expressions.

General Format:
(new ['name] ['class1] ['class2] ...)

where:
The first input names the new thing.
The second and remaining inputs specify the new thing's classes.
If the specified classes do not exist, they are created.

Examples:
(new)
(new 'john)
(new 'mary 'person)
(new 'bob 'person 'doctor)

Details:
The expression (new 'mary 'person) is shorthand for following, assuming the class person did not already exist:

(; Create a db item named person)
(new)
(set db item (it))
(set (it) name 'person)

(; Create a person named mary)
(new)
(set person instance (it))
(set (it) name 'mary)

Notes:
The creation of rolex replica the watch is inspired by the retro and elegant money of rolex replica watches the brand's round watch. The chronograph is omega replica simple and stylish, with the line features of rolex replica uk the watch series.

CM ©2000-2007