Files
ngspice/examples/loops/loop_foreach.cir
T
Holger Vogt 6b03aaa15f examples for loops.
The syntax is listed in the ngspice manual,
chapter 17.6 Control Structures. Practical examples
using a simple voltage divider circuit are given here.
2022-04-26 10:32:53 +02:00

16 lines
195 B
Plaintext

example foreach loop
.control
foreach val -40 -20 0 20 40
echo var is $val
end
echo
set myvariable = ( -4 -2 0 2 4 )
foreach var $myvariable
echo var is $var
end
.endc
.end