TuAppField, TuInsField, TuAssField
Purpose: Inserts fields into objects or assigns values to object fields. The object.field parameter must denote an object field, which means that it must be an expression of the form t.name or t[expr] where t must be an object. The value parameter can be an object field or any value. The name parameter must be a string, if given. The new/replaced object field gets the value specified by the value parameter. If the name parameter is given, then the new/replaced object field gets the field name denoted by name. If the name parameter is not given, but the value parameter specifies an object field, then the name of this field is taken. Otherwise the new/replaced object field gets no name. If the name specified leads to a name clash (i.e. there is already a field with the same name in the object), then the new/replaced object field also gets no name. The function TuAppField() inserts a new object field into the object denoted by object. The field is inserted after the field given as the first parameter. The function TuInsField() inserts a new object field into the object denoted by object. The field is inserted before the field given as the first parameter. The function TuAssField() replaces the object field denoted by the first parameter within the object denoted by object. Return Values: None of these functions return a useful value. Example:
See Also: TuAssign(), TuDelField(), TuFieldSort(), TuMerge(), TuName(), TuProject(), TuSlice(). © 1996-2025 H.E.I. All Rights Reserved. |
![]() |