* .param, .func, .subckt working together
.param mult=3 rtop=2k
.func scaled(x)={x*mult}
.subckt divider a b rt=1k rb=1k
  R1 a mid {rt}
  R2 mid b {rb}
.ends
V1 in 0 DC {scaled(1)}
X1 in 0 divider rt={rtop} rb=1k
.tran 1u 5u
.control
  run
  print v(in)[0]          $ scaled(1) = 3
  print v(x1.mid)[0]      $ 3 * 1k/(2k+1k) = 1
.endc
.end
