Skip to main content

Number

Number typed values are a number.

Numbers...

Initialization

Number typed values can be constructed from a literal or templated number.

A templated number is a number which includes one or more variable-reference [string]. At runtime, each reference gets evaluated and replaced with it's corresponding value.

Initialization Example (literal)

2

Initialization Example (templated)

given:

  • someNumber
    • is in scope
    • is type coercible to number
# $(someNumber) replaced w/ someNumber
222$(someNumber)3e10

Coercion

Number typed values are coercible to:

Coercion Example (number to file)

name: numAsFile
run:
container:
image: { ref: alpine }
cmd:
- sh
- -ce
- cat /numCoercedToFile
files:
/numCoercedToFile: 2.2