getprop

getprop -- returns a property value for a symbol.

Syntax

getprop (symbol, property)

		

Arguments

symbol

A symbol.

property

A symbol naming the property to be fetched.

Returns

The value of the property for the given symbol, or nil if the property is not defined.

Description

Return the value of the property for the given symbol. Once a property has been set for a symbol, it will remain as long as the Gamma program is running.

Example

    Gamma> tag001 = 5.5;
    5.5
    Gamma> setprop(#tag001, #maxlimit,10);
    nil
    Gamma> getprop(#tag001, #maxlimit);
    10
    Gamma> getprop(#tag001, #minlimit);
    nil
    Gamma> 
    		

See the Trend Functions section of the Photon Functions chapter (Tutorial One) in the Cogent Tools Demo and Tutorials book for an example of this function used in context.

See Also

properties, setprop, setprops

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.