Skip to main content

varLongWord

varLongWord = 19

Example

function HasUnsigned32Storage(const Value: Variant): Boolean;
begin
Result := (VarType(Value) and varTypeMask) = varLongWord;
end;

Usage

varLongWord identifies an unsigned 32-bit Variant integer using Velox's deprecated name for the current varUInt32 code.

Additional Technical Info

varLongWord is the base TVarType code $0013 for an unsigned 32-bit integer (0..4,294,967,295). Current Delphi keeps the same numeric code under the preferred name varUInt32 and marks varLongWord deprecated; Velox exposes the legacy name only.

Values above signed 32-bit maximum cannot fit a script LongInt. Preserve them in a capable Variant/native field or use validated decimal text when the consuming script API is signed-only. Converting through Double remains exact for all UInt32 values, but that habit becomes unsafe for wider identifiers and obscures the intended integer contract.

Current Delphi Automation dispatch has a host-global DispatchUnsignedAsSigned compatibility switch. When enabled, an unsigned 32-bit dispatch argument is re-tagged as varInteger, so values above MaxInt cannot retain the same unsigned meaning. Treat COM/provider behavior as part of the interface contract.

VarAsType can request code 19 and raises on negative/out-of-range input. Packed Variant creation may select a narrower unsigned tag for smaller values.

Mask VarType when flags can be present. The example is source-reviewed only; no unsigned conversion or dispatch occurred.

External references

Created 2026-07-15