예제 #1
0
 /**
  * The main body of this process.
  */
 public void run()
 {
     while (true)
     {
         Out.write(In.read() + 1);
         //Console.WriteLine("After adding value in Successor");
     }
 }
예제 #2
0
        /**
         * The main body of this process.
         */
        public void run()
        {
            Out.write(n);

            //Console.WriteLine("First Prefix  object is " + n.ToString());

            new IdentityInt(In, Out).run();
        }
 public void write(int i)
 {
     if (!syncDone)
     {
         ab.sync();
     }
     syncDone = false;
     Out.write(i);
 }
예제 #4
0
 /**
  * The main body of this process.
  */
 public void run()
 {
     //Console.WriteLine("Inside identity int");
     while (true)
     {
         //Out.write(In.read());
         var a = In.read();
         //Console.WriteLine("Prefix  identityInt is " + a.ToString());
         Out.write(a);
     }
 }
예제 #5
0
        public void run()
        {
            int i = 1000;

            while (i > 0)
            {
                Console.Write("\nEnter next number (-100, 100):\t");
                string input = Console.ReadLine();

                if (!int.TryParse(input, out i))
                {
                    Console.WriteLine("You have entered invalid number");
                    continue;
                }
                else
                {
                    outChannel.write(i);
                }
            }
        }
예제 #6
0
 /**
  * The main body of this process.
  */
 public void run()
 {
     //Console.WriteLine("Before writing value in ProcessWriter");
     Out.write(value);
     //Console.WriteLine("After writing value in ProcessWriter");
 }