From: Yong Li Date: 2012-02-06T12:43:55+09:00 Subject: Re: Please help me find the error in my logical OR On Sun, Feb 5, 2012 at 10:30 AM, h4y4shi 13bladex wrote: > Please help me find the error in my logical OR. >   When you run the program there will not be an error message. I want > the gstats numbers (a-d) to all be between 1-6 except for 1. Sometimes I > run the program and the numbers are between 1-6 except for one. Other > times I run the program and I get two numbers with the value 0. I have > looked for the error for a long time and I cannot find it. > > I think the error is in the following code. > > if (stats1a>stats1b) or (stats1a>stats1c) or (stats1a>stats1d) then >  gstats1a = stats1a > end > if (stats1b>stats1a) or (stats1b>stats1c) or (stats1b>stats1d) then >  gstats1b = stats1b > end > if (stats1c>stats1b) or (stats1c>stats1a) or (stats1c>stats1d) then >  gstats1c = stats1c > end > if (stats1d>stats1b) or (stats1d>stats1c) or (stats1d>stats1a) then >  gstats1d = stats1d > end > as an exercise, you may play your code with the following values for stats1x stats1a = 2 stats1b = 2 stats1c = 3 stats1d = 4