Sha256: d45e02880d17bfd548383fe54ef09ffa366a6e52e1c5b902bb95041be1bf8a63
Contents?: true
Size: 618 Bytes
Versions: 10
Compression:
Stored size: 618 Bytes
Contents
HCL doesn't have an exponentiation operator and even integer division is contrived as shown in the code, but at least it prints the output variables alphabetically without any effort....... #Aamrun, 15th August 2022 variable "a" { type = number } variable "b" { type = number } output "Sum" { value = var.a + var.b } output "Difference" { value = var.a - var.b } output "Product" { value = var.a * var.b } output "Quotient" { value = floor(var.a / var.b) } output "Remainder" { value = var.a % var.b } The floor function rounds to the closest lowest integer. Invocation and output are as below :
Version data entries
10 entries across 7 versions & 1 rubygems