delete

 

 

Overview

The delete function destructively deletes the specified value from a Vector. The object is specified explicitly as an argument {obj} or by the index {index} into the Vector. The Vector is decreased in size to reflect the lost value.

Structure

The delete function destructively deletes the specified binding from a Structure. The key is specified explicitly as an argument {key} or by the index {index} into the Structure. The Structure, is decreased in size to reflect the lost value.

Dictionary

The delete function destructively deletes the specified binding from a Dictionary. The key is specified explicitly as an argument {key} or by the index {index} into the Dictionary. The Dictionary is decreased in size to reflect the lost value.

Directory

The delete function destructively deletes the specified binding from a Directory. The key is specified explicitly as an argument {key} or by the index {index} into the Directory. The Directory is decreased in size to reflect the lost value.

ObjectRepository

The delete function destructively deletes the specified binding from a ObjectRepository. The key is specified explicitly as an argument {key} or by the index {index} into the ObjectRepository. The ObjectRepository is decreased in size to reflect the lost value.

Matrix

The delete function destructively deletes the specified object from a Matrix. The object is specified explicitly as an argument {obj} or by the index {index} into the Matrix. The Matrix is decreased in size to reflect the lost value.

NumMatrix

The delete function destructively deletes the specified object from a NumMatrix. The object is specified explicitly as an argument {obj} or by the index {index} into the NumMatrix. The NumMatrix is decreased in size to reflect the lost value.

Pair

The delete function removes the occurrence of the specified key from the specified source Pair. The delete function Is non-destructive, ie, it returns a new Pair that has the specified item removed from it.

List

The delete function removes the occurrence of the specified key from the specified source List. The delete function Is non-destructive, ie, it returns a new List that has the specified item removed from it.

Usage

Use delete function is used to remove a binding from a Structure, Dictionary, ObjectRepository or Directory. The binding to be deleted can be specified by key or as a numeric index.

The delete function behaves like the remove function with the following exception:

  • The delete function is destructive and the remove function is non-destructive.
  • The delete function deletes a member by specifying the key or a numeric index and the remove deletes a member by specifying the key only.
  • Vector

    The delete function is used to remove an object from a Vector. The object to be deleted must be specified as an index into the Vector. The delete function behaves like the remove function with the following exception: The delete function is destructive and the remove function is non-destructive.

    FltVector

    The delete function is used to remove an object from a FltVector. The object to be deleted must be specified as an index into the FltVector. The delete function behaves like the remove function with the following exception: The delete function is destructive and the remove function is non-destructive.

    IntVector

    The delete function is used to remove an object from a IntVector. The object to be deleted must be specified as an index into the IntVector. The delete function behaves like the remove function with the following exception: The delete function is destructive and the remove function is non-destructive.

    ShortVector

    The delete function is used to remove an object from a ShortVector. The object to be deleted must be specified as an index into the ShortVector. The delete function behaves like the remove function with the following exception: The delete function is destructive and the remove function is non-destructive.

    NumVector

    The delete function is used to remove an object from a NumVector. The object to be deleted must be specified as an index into the NumVector. The delete function behaves like the remove function with the following exception: The delete function is destructive and the remove function is non-destructive.

    ObjVector

    The delete function is used to remove an object from a ObjVector. The object to be deleted must be specified as an index into the ObjVector. The delete function behaves like the remove function with the following exception: The delete function is destructive and the remove function is non-destructive.

    Matrix

    Note: Returns an error message if the Matrix is not of rank one.

    Use delete function is used to remove an object from a Matrix. The object to be deleted must be specified as an index into the Matrix. The delete function behaves like the remove function with the following exception: The delete function is destructive and the remove function is non-destructive.

    NumMatrix

    Note: Returns an error message if the NumMatrix is not of rank one.

    Use delete function is used to remove an object from a NumMatrix. The object to be deleted must be specified as an index into the NumMatrix. The delete function behaves like the remove function with the following exception: The delete function is destructive and the remove function is non-destructive.

    Pair

    Use delete function to remove an object from a List

     

    Syntax


    Expression:

    (delete vector key)


    Arguments Name Type Description
    Argument:vectorVector FltVector IntVector ShortVector NumVector ObjVector The Vector you wish to modify.
    Argument:keySymbol An existing key in the Vector.

    Returns:

    The modified Vector. If the key or index is not found the Vector is returned unmodified




    Expression:

    (delete struct key)


    Arguments Name Type Description
    Argument:structStructure The Structure you wish to modify.
    Argument:keySymbol An existing key in the Structure.

    Returns:

    The modified Structure. If the key or index is not found the Structure is returned unmodified




    Expression:

    (delete struct index)


    Arguments Name Type Description
    Argument:structStructure The Structure you wish to modify.
    Argument:indexInteger The numeric index of the object you wish to delete.

    Returns:

    The modified Structure. If the key or index is not found the Structure is returned unmodified




    Expression:

    (delete dictionary key)


    Arguments Name Type Description
    Argument:dictionaryDictionary The Dictionary you wish to modify.
    Argument:keySymbol An existing key in the Dictionary.

    Returns:

    The modified Dictionary. If the key or index is not found the Dictionary is returned unmodified




    Expression:

    (delete dictionary index)


    Arguments Name Type Description
    Argument:dictionaryDictionary The Dictionary you wish to modify.
    Argument:indexInteger The numeric index of the object you wish to delete.

    Returns:

    The modified Dictionary. If the key or index is not found the Dictionary is returned unmodified




    Expression:

    (delete directory key)


    Arguments Name Type Description
    Argument:directoryDirectory The Directory you wish to modify.
    Argument:keySymbol An existing key in the Directory.

    Returns:

    The modified Directory. If the key or index is not found the Directory is returned unmodified




    Expression:

    (delete directory index)


    Arguments Name Type Description
    Argument:directoryDirectory The Directory you wish to modify.
    Argument:indexInteger The numeric index of the object you wish to delete.

    Returns:

    The modified Directory. If the key or index is not found the Directory is returned unmodified




    Expression:

    (delete matrix index)


    Arguments Name Type Description
    Argument:matrixMatrix The Matrix you wish to modify.
    Argument:indexInteger If present, it must be the index of the object you wish to delete

    Returns:

    The modified Matrix. If the object or index is not found the Matrix is returned unmodified.




    Expression:

    (delete nummatrix index)


    Arguments Name Type Description
    Argument:nummatrixNumMatrix The NumMatrix you wish to modify.
    Argument:indexInteger If present, it must be the index of the object you wish to delete

    Returns:

    The modified NumMatrix. If the object or index is not found the NumMatrix is returned unmodified.




    Expression:

    (delete obj pair)


    Arguments Name Type Description
    Argument:objCharacter String Symbol Vector BitVector ByteVector IntVector FltVector ObjVector Structure Dictionary Directory Brick Matrix NumMatrix Integer Float Number Complex Boolean The object to delete.
    Argument:pairPair The source Pair.

    Returns:

    Returns a new Pair.




    Expression:

    (delete obj list)


    Arguments Name Type Description
    Argument:objCharacter String Symbol Vector BitVector ByteVector IntVector FltVector ObjVector Structure Dictionary Directory Brick Matrix NumMatrix Integer Float Number Complex Boolean The object to delete.
    Argument:listList The source List.

    Returns:

    Returns a new List.




    Expression:

    (delete aGor key)


    Arguments Name Type Description
    Argument:aGorObjectRepository The ObjectRepository you wish to modify.
    Argument:keyCharacter String Symbol Vector BitVector ByteVector IntVector FltVector ObjVector Structure Dictionary Directory Brick Matrix NumMatrix Integer Float Number Complex Boolean Must be an existing object in the ObjectRepository.

    Returns:

    Always returns the Object Repository. If the key is found, the Object Repository has the key removed. If the key index is not found the ObjectRepository is returned unmodified.



     

    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 Dictionary Directory Integer
    Vector Pair List Symbol
    NumMatrix ObjectRepository Matrix FltVector
    ShortVector IntVector NumVector ObjVector

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

    ++ += + /=
    / *= * --
    -= - abortTransaction addMethod
    addi appendWriteln append apply
    associate attachLibrarian avg badd
    balance bdiv beginTransaction binaryInsert
    binaryNand binaryNor binaryNot binaryNxor
    binarySearch bitToIntegerVector bitToNumberVector bitwiseAnd
    bitwiseNand bitwiseNor bitwiseNot bitwiseNxor
    bitwiseOr bitwiseShiftLeft bitwiseShiftRight bitwiseXor
    bmod bmul boolean c::r
    cadd car cdiv cdr
    char character checkPointTransaction class
    cmod cmul code commitTransaction
    compareEQ compareGE compareGT compareLE
    compareLT compareNE compare comparison
    compile compress cons copy
    count csub day days360
    debugDetective debug defchild defclass
    define(macro) defineStructure define defmacro
    defmethod deforphan defriend defstruct
    defun deleteRows delete detachLibrarian
    dimension disassemble display divi
    downcase encode evalInSyncLocalContext eval
    exit exportCsv exportSbf exportTab
    fact fdisplay fieldsOf fileClose
    fileCopy fileDisplay fileErase fileOpen
    fileReadRecord fileRead fileResize fileSeek
    fileWrite filewriteln findBlock find
    floor fraction freeBlock gc
    gcd getGlobalValue getRecursionCount getSymbolTable
    globalBinding hashString hour iadd
    icompareEQ icompareGE icompareGT icompareLE
    icompareLT icompareNE idiv imod
    importCsv importSbf importTab imul
    insertRows insert inside inspect
    integer isAtom isBitVector isBoolean
    isBound isByteVector isCharAlphabetic isCharAlphanumeric
    isCharLowercase isCharName isCharNumeric isCharUppercase
    isCharWhitespace isChar isCharacter isClass
    isComplex isDate isDictionary isDirectory
    isEqual isError isEven isFloatVector
    isIdentical isImmediate isInside isIntegerVector
    isInteger isLambda isMatrix isMember
    isMoney isNumberMatrix isNumberVector isNumber
    isObjectVector isObject isPair isPcodeVector
    isString isStructure isSymbol isText
    isTransaction isType isVector isub
    kurtosis last lcm left
    length lisp list loadRepository
    lock macroReplace makeDictionary makeGaussianMatrix
    makeGramMatrix makeQuotedList makeQuotedSymbol makeStructure
    map mapc matrixGaussianEliminate matrixGaussianSubstitute
    max median member methodsOf
    mid min minute mod
    modi money month morph
    muli new number objectToDictionary
    objectToDirectory objectToList objectToMatrix objectToNumMatrix
    objectToNumVector objectToStructure objectToVector offset
    openLog pair parent parse
    pointer preAllocateFixedMemoryBlocks product proplist
    proprecord putprop qt quote
    random randomize range rank
    refAttributes refLibrarian refValues ref
    remProp remove rename replace
    rept resize reverse right
    round saveImmediate saveObject saveRepository
    second send setAttributes setBlock
    setCar setCdr setLastCdr set
    setf setq sizeof skew
    sort sql sqrt srandom
    stdev stdevp stringToBVector stringToVector
    string subi substitute substring
    sum sumsqr super svmRegression
    symbolToTypeCode symbol system text
    time type uniqueInsert unlock
    var varp vectorBinaryInnerProduct vectorBipolarInnerProduct
    vectorCosineInnerProduct vectorCubeInnerProduct vectorDelete vectorExpInnerProduct
    vectorFill vectorInnerProduct vectorLogInnerProduct vectorQuartInnerProduct
    vectorQuintInnerProduct vectorSigmoidInnerProduct vectorSineInnerProduct vectorSquareInnerProduct
    vectorTanInnerProduct vectorTanhInnerProduct writelg writeln
    year

    Analytic Information Server (AIS)

    AIS Component Systems

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