This is the old version of our wiki. We advice to visit: https://www.geodms.nl

Const

From ObjectVision

Jump to: navigation, search

Constant functions const

Contents

syntax

  • const(value, domainunit)
  • const(value, domainunit, valuesunit)

definition

const(value, domainunit) or const(value, domainunit, valuesunit) results in an attribute with the first argument value as constant value for each entry of the domainunit (second argument).

The valuesunit can be configured with the value argument or explicitly as third argument.

description

  • const(0 , domain) is synonym for const(0,domain,unit32).
  • const(0f , domain) or const(float32(0),domain) is synonym for const(0,domain,float32).
  • const(3[m], domain) is synonym for const (3, domain, m).

applies to

conditions

The value type of argument value needs to match with the value type of the valuesunit argument.

since version

5.15

example

attribute<string> stringAtt (ADomain) := const('const', ADomain, string);
stringAtt
'const'
'const'
'const'
'const'
'const'

ADomain, nr of rows = 5

Personal tools