#include "Sim.h"

void simnet()
{
  Signal sw0, sw1;          // These signals are unnamed 
  Signal out(1,"MyOutput");   // Named out as "MyOutput"

  Switch ( "aa", sw0, 'a', Zero );  // Location = "aa", name = sw0, key = 'a'
  Switch ( "ca", sw1, 'b', One );   // Initial value: Zero or One

  And  ( "bb", (sw0,sw1), out );    // And: inputs = (sw0,sw1), output = out

  // Note:  ( .., .. )   group signals into 1 signal
  // Note:  sw0 is equivalent to sw0[0]

  Probe ( "bc", out );              // Probe out
}
