getq
getq(sl_idS_name) =>g_result/nilsl_id->S_name=>g_result/nil
Description
Returns the value of a property in a property list. Same as get except that the second argument is not evaluated. This is a syntax form.
getq corresponds to -> as an LHS infix operator. So, obj->prop is equivalent to getq(obj prop).
Used in conjunction with putprop, where putprop stores the property and getq retrieves it.
Arguments
Value Returned
Examples
putprop( 'chip 8 'pins )
=> 8
Assigns the property pins to a value of 8 to the symbol chip.
getq( 'chip pins )
=> 8
chip.pins
=> 8
chip1 = list(nil 'pins 10)
=> (nil pins 10)
chip1->pins
=> 10
Related Topics
Mapping Symbols to Values
Return to top