/
Beestings
Beestings
KRL extended quotes support the beesting operator, making them simple templating systems. Inside an extended quote, expression values can be referenced using the #{<expr>}
syntax. For example, suppose you've stored 10 and 20 in the variables a
and b
:
somevar = << The average of #{a} and #{b} is #{(a + b)/2} >>;
The value of somevar
would be "The average of 10 and 20 is 15."
A beesting is escaped with a backslash (\#{
).
Non-Scalar Values
If you try to insert non-scalar values into a string using the beesting syntax, only their types will be printed. For a non-scalar, use the encode()
operator on the value first to turn it into a string.
Related content
Bitwise Operators
Bitwise Operators
More like this
Pods Demo Instructions
Pods Demo Instructions
More like this
Pods Documentation
Pods Documentation
More like this
hasValidAccessToken()
hasValidAccessToken()
More like this
pods:connectStorage(storageURL, clientID, clientSecret, tokenURL)
pods:connectStorage(storageURL, clientID, clientSecret, tokenURL)
More like this
Copyright Picolabs | Licensed under Creative Commons.