Additional Topics > External Development Guide > IDLInternals - Variables > Storing Scalar Values

# Storing Scalar Values

The IDL_StoreScalar() function sets an IDL_VARIABLE to a scalar value:

void IDL_StoreScalar(IDL_VPTR dest, int type, IDL_ALLTYPES *value)

where:

### dest

An IDL_VPTR to the IDL_VARIABLE in which the scalar should be stored.

### type

The type code for the scalar value. See Type Codes.

### value

The address of the IDL_ALLTYPES union that contains the value to store.

If dest is a location that cannot be stored into (for example, a temporary variable, constant, and so on), an error is issued and control returns to the interpreter. Otherwise, any dynamic part of dest is freed and value is stored into it.

The IDL_StoreScalarZero() function is a specialized variation of IDL_StoreScalar(). It stores a zero scalar value of any specified type into the specified variable:

void IDL_StoreScalarZero(IDL_VPTR dest, int type)