File: shapeparamtest1.cfdg

package info (click to toggle)
contextfree 3.1%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,432 kB
  • sloc: cpp: 34,857; lex: 416; makefile: 124; sh: 42; python: 41
file content (16 lines) | stat: -rw-r--r-- 297 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
startshape test

shape foo(number sz)
{
  SQUARE [r 0..90 s sz]
}

shape curve(number scale, number turn, shape thingie)
{
  thingie[]  // invoke thingie with parameters already bound
  curve(=) [[y 0.5 s scale r turn y 0.5]]
}

shape test {
  curve(0.97, 3, foo(0.5)) [] // bind 0.5 to sz here
}