functions

fhSetValueAsInteger

Description

Set the item at the pointer value to an integer.

Syntax

bOK = fhSetValueAsInteger(ptr, iValue)

Parameters

ptr
item pointer: Item to be updated.
iValue
integer : numeric value to be used.

Returns

bOK
boolean: returns true on success and false on failure

Remarks

Pointer must exist, for new items, use fhCreateItem prior to fhSetValueAsInteger, if not changing an existing value.

Example

Sets Child Count for first person in the file to 3.

iChildren = 3
ptrInd = fhNewItemPtr()
ptrInd:MoveToFirstRecord('INDI')
ptrCC = fhGetItemPtr(ptrInd,'~.NCHI')
if ptrCC:IsNull() then
  ptrCC = fhCreateItem('NCHI',ptrInd)
end
fhSetValueAsInteger(ptrCC,iChildren)