Skip to main content

IsNumericType

function IsNumericType: Boolean

Example

procedure ScriptEvent(var Value: variant);
begin
Value := Field.IsNumericType;
end;

Usage

IsNumericType reports whether the field DataType belongs to Velox's fixed numeric and date/time set.

Additional Technical Info

IsNumericType performs a fixed DataType in [...] membership test.

It returns true for:

ftSmallint, ftInteger, ftWord, ftBoolean, ftFloat, ftCurrency,
ftBCD, ftDate, ftTime, ftDateTime, ftAutoInc, ftLargeint,
ftFMTBcd, ftSingle, ftExtended, ftShortint, ftByte, ftLongWord,
ftTimeStamp

The source lists ftLongWord twice; set membership makes the duplicate harmless. Boolean and date/time values are deliberately included because IsNullZero and SetIfZero compare this group with zero. All IsDateType values are therefore also numeric by this method.

This is not a general conversion-capability test. Unlisted field types return false, including ftTimeStampOffset and any later/specialised numeric-like types. Check the concrete field and intended conversion separately.

Registration quirk

The PascalScript compiler registration string contains an extra final ) after boolean. Its method parser completes the return type before that trailing token, while the runtime importer binds TvxField.IsNumericType under the expected name. The function is therefore available; the punctuation is a product-source cleanup item rather than a different signature.

The method is a constant-time read with no value/cursor side effect. An invalid field reference remains unsafe.

External references

Created 2026-07-15