MakeUpdatedRecord (open)

Updates the cells in a record with an extra record

Syntax

// Core function, no LOADLIB necessary

RECORD FUNCTION MakeUpdatedRecord(RECORD original, RECORD updatedata)

Parameters

RECORD original

Original record

RECORD updatedata

Record to update data in the original record with

Return value

RECORD

The updated record

Description

MakeUpdatedRecord merges a new record into an existing record.. The resulting record contains all the cells in the original record, but any values found in the new record will be updated into the original record. If the type of two cells differ, it will not be updated. The function will recurse through record cells

Examples

MakeUpdatedRecord( [ a := 1, subrec := [ b := 1, c := 1] ]
                 , [ b := 2, subrec := [ c := 2 ] ] );

// Will return [ a := 1, subrec := [ b := 1, c := 2 ] ];