Skip to main content

Mojo function

env_get_int

env_get_int[name: StringLiteral]() -> Int

Try to get an integer-valued define. Compilation fails if the name is not defined.

Parameters:

  • name (StringLiteral): The name of the define.

Returns:

An integer parameter value.

env_get_int[name: StringLiteral, default: Int]() -> Int

Try to get an integer-valued define. If the name is not defined, return a default value instead.

Parameters:

  • name (StringLiteral): The name of the define.
  • default (Int): The default value to use.

Returns:

An integer parameter value.