Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: modernize for 0.52.2

...

Code Block
languagejavascript
themeConfluence
global {
  x = com.windley.krl.blast:flip * 3;
}


Note
titleCode doesn't compile

The above code doesn't compile. The syntax of a ruleset identifier (RID) allows it to contain periods and hyphens. But those are not allowed in identifiers, so the string preceding the colon above is not an identifier. The next sections shows how to work around this.


Aliasing

The optional alias keyword declares an alias for the ruleset name. So if com.windley.krl.blast ruleset is used as follows:

...

  • app
  • csv
  • engine
  • ent
  • event
  • ical
  • keys
  • http
  • indy
  • math
  • meta
  • random
  • rss
  • schedule
  • time
  • uri
  • wrangler

...

Code Block
languagejavascript
themeConfluence
ruleset foobar {
  meta {
    use module com.windley.krl.blast alias blast
  }
  global {
    x = com.windley.krl.blast:a + 4;
    y = com.windley.krl.blast:f(4);
  }
  ...
}

When rules in ruleset foobar execute, x will have the value 9 and y will have the value 10. Note that if we had referenced com.windley.krl.blast:b it would be undefined since b is not in the provides pragma in the module. 

...