Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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."

  • No labels