german-colors.taq

$ java -jar taq.jar german-colors

Running query colors in global scope 
swatch_axiom(swatch=Wasser, Red=0, Green=255, Blue=255)
swatch_axiom(swatch=blau, Red=0, Green=0, Blue=255)

Description``

german-colors.taq dmonstrates that the result of a selection operation can be accessed in an attached receiver. This is useful for appending the result to an axiom list.


$ list<term> colors

scope german (
language="de",
region="DE",
background=3,
foreground=2)

axiom german.colors (aqua, black, blue, white)
{"Wasser", "schwarz", "blau", "weiß"}

flow german_palette
{
select color
( colors, r, g, b, tag )
{
? aqua: 0, 255, 255
? black: 0, 0, 0
? blue: 0, 0, 255
? white: 255, 255, 255
}
}
(
term color1,
term color2,
. flow color(shade=colors[scope->background], tag="background")
{ color1 = color },
. flow color(shade=colors[scope->foreground], tag="foreground")
{ color2 = color }
)

query<term> colors (german.german_palette)