Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

getq

getq( 
sl_id 
S_name 
) 
=> g_result / nil
sl_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

sl_id

Symbol or disembodied property list.

S_name

Name of the property you want the value of.

Value Returned

g_result

Value of S_name in the sl_id property list.

nil

The named property does not exist.

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

get

getqq

plist

putprop

Mapping Symbols to Values

Return to top
 ⠀
X