EDN Admin
Well-known member
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt I was wondering if i can get some help or if somebody can explain to me how to change the backslash and slash diagonal from a boolean expression to separate
loop?
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt
<span style="font-size:x-small
<p style="line-height:normal; margin-bottom:0pt <span style="color:blue; font-family:Courier New; font-size:8pt public<span style="font-family:Courier New; font-size:8pt
<span style="color:blue bool Bingo()
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
{
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:green // Test for rows...
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue for (<span style="color:blue int row = 0; row < 5; row++)
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
{
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue int col;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue for (col = 0; col < 5; col++)
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
{
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue if (!<span style="color:blue this[col, row].Selected)
<span style="color:blue break;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
}
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue if (col == 5) <span style="color:blue return
<span style="color:blue true;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
}
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:green // Test for columns
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue for (<span style="color:blue int col = 0; col < 5; col++)
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
{
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue int row;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue for (row = 0; row < 5; row++)
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
{
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue if (!<span style="color:blue this[col, row].Selected)
<span style="color:blue break;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
}
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue if (row == 5) <span style="color:blue return
<span style="color:blue true;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
}
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:green // Test for backslash diagonal
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue if (<span style="color:blue this[0, 0].Selected &&
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span> <span style="color:blue this[1, 1].Selected &&
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue this[3, 3].Selected &&
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue this[4, 4].Selected) <span style="color:blue
return <span style="color:blue true;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:green // test for slash diagonal
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue if (<span style="color:blue this[0, 4].Selected &&
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue this[1, 3].Selected &&
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue this[3, 1].Selected &&
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue this[4, 0].Selected) <span style="color:blue
return <span style="color:blue true;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue return <span style="color:blue false;
<p style="line-height:normal; margin-bottom:0pt
<p style="line-height:normal; margin-bottom:0pt
<br/>
View the full article
loop?
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt
<span style="font-size:x-small
<p style="line-height:normal; margin-bottom:0pt <span style="color:blue; font-family:Courier New; font-size:8pt public<span style="font-family:Courier New; font-size:8pt
<span style="color:blue bool Bingo()
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
{
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:green // Test for rows...
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue for (<span style="color:blue int row = 0; row < 5; row++)
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
{
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue int col;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue for (col = 0; col < 5; col++)
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
{
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue if (!<span style="color:blue this[col, row].Selected)
<span style="color:blue break;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
}
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue if (col == 5) <span style="color:blue return
<span style="color:blue true;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
}
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:green // Test for columns
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue for (<span style="color:blue int col = 0; col < 5; col++)
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
{
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue int row;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue for (row = 0; row < 5; row++)
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
{
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue if (!<span style="color:blue this[col, row].Selected)
<span style="color:blue break;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
}
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue if (row == 5) <span style="color:blue return
<span style="color:blue true;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
}
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:green // Test for backslash diagonal
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue if (<span style="color:blue this[0, 0].Selected &&
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span> <span style="color:blue this[1, 1].Selected &&
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue this[3, 3].Selected &&
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue this[4, 4].Selected) <span style="color:blue
return <span style="color:blue true;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:green // test for slash diagonal
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue if (<span style="color:blue this[0, 4].Selected &&
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue this[1, 3].Selected &&
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue this[3, 1].Selected &&
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue this[4, 0].Selected) <span style="color:blue
return <span style="color:blue true;
<p style="line-height:normal; margin-bottom:0pt <span style="font-family:Courier New; font-size:8pt <span>
<span style="color:blue return <span style="color:blue false;
<p style="line-height:normal; margin-bottom:0pt
<p style="line-height:normal; margin-bottom:0pt
<br/>
View the full article