Skip to content
Jip Claassens edited this page Jul 7, 2026 · 9 revisions

Constant functions const

syntax

  • const(value, domain unit)
  • const(value, domain unit, values unit)

definition

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

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

description

  • const(0 , domain) is synonym for const(0,domain,uint32).
  • 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 values unit argument.

example

attribute<uint8>  Uint8Att  (ADomain) := const(1b, ADomain);
attribute<string> StringAtt (ADomain) := const('const', ADomain, string);
Uint8Att StringAtt
1 'const'
1 'const'
1 'const'
1 'const'
1 'const'

ADomain, nr of rows = 5

Clone this wiki locally