std-default-type


Synopsis

(std-default-type '<sym> <value>)

Description

If the value of sym is different from the return value of the argument value, then set sym to this return value.

STD-DEFAULT-TYPE is like STD-DEFAULT used to initialize a variable. It's only stronger. It forces a type for sym. STD-DEFAULT-TYPE should be used if the variable is used in a type critical function.

Example

(std-default-type '*my-length* 10.0)

Arguments

sym: a quoted symbol, which evaluates to a symbol which needs not to be bound.

value: any valid lisp expression

Return Value

Not defined. Usually the return value of value.

Side Effects

This function is only called because of its side effect.

It may change the value of sym. <value> is always evaluated which may be a drawback. See (std-default) for a workaround.

Module

(std-require 'STDLISP)

Defined in STDLISP