Reference.Else History

Hide minor edits - Show changes to markup

June 15, 2010, at 04:51 AM by Equipo Traduccion -
Changed lines 37-39 from:
to:
June 01, 2010, at 07:15 AM by Equipo Traduccion -
Changed lines 15-16 from:

Cada comprobación procederá a la siguiente, sólo cuando su propio resultado sea TRUE. Cuando el resultado sea TRUE, su bloque de código contenido, será ejecutado, y el programa esquivará las siguientes comprobaciones hasta el final de la estructura de comprobaciones. Si ninguna comprobación devuelve valor TRUE, el else será ejecutado, y de no haber ninguno declarado, simplemente no sucede nada.

to:

Cada comprobación procederá a la siguiente, sólo cuando su propio resultado sea FALSE. Cuando el resultado sea TRUE, su bloque de código contenido, será ejecutado, y el programa esquivará las siguientes comprobaciones hasta el final de la estructura de comprobaciones. Si ninguna comprobación devuelve valor TRUE, el else será ejecutado, y de no haber ninguno declarado, simplemente no sucede nada.

June 01, 2010, at 07:13 AM by Equipo Traduccion -
Changed lines 3-5 from:

if/else allows greater control over the flow of code than the basic if statement, by allowing multiple tests to be grouped together. For example, an analog input could be tested and one action taken if the input was less than 500, and another action taken if the input was 500 or greater. The code would look like this:

[@if (pinFiveInput < 500)

to:

if/else permite mayor control sobre el flujo del código que la declaración if básica, por permitir agrupar múltiples comprobaciones. Por ejemplo, un input análogo podría ser comprobado, y tomarse una acción si el valor del inputes menor a 500, y, otra acción se ser igual o mayor a 500. El código se vería así:

[@if (pinCincoInput < 500)

Changed line 7 from:
  // action A
to:
  // acción A
Changed line 11 from:
  // action B
to:
  // acción B
Changed lines 14-20 from:

else can proceed another if test, so that multiple, mutually exclusive tests can be run at the same time.

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present, and sets the default behavior.

Note that an else if block may be used with or without a terminating else block and vice versa. An unlimited number of such else if branches is allowed.

[@if (pinFiveInput < 500)

to:

else puede proceder a una comprobación if, de esta forma, se pueden realizar múltiples comprobaciones en una misma estructura de condiciones. Cada comprobación procederá a la siguiente, sólo cuando su propio resultado sea TRUE. Cuando el resultado sea TRUE, su bloque de código contenido, será ejecutado, y el programa esquivará las siguientes comprobaciones hasta el final de la estructura de comprobaciones. Si ninguna comprobación devuelve valor TRUE, el else será ejecutado, y de no haber ninguno declarado, simplemente no sucede nada.

Entonces un bloque else if puede ser usado con o sin else al final. La cantidad de declaraciones else if, y sus ramificaciones son ilimitadas.

[@if (pinCincoInput < 500)

Changed line 21 from:
  // do Thing A
to:
  // ejecutar A
Changed line 23 from:

else if (pinFiveInput >= 1000)

to:

else if (pinCincoInput >= 1000)

Changed line 25 from:
  // do Thing B
to:
  // ejecutar B
Changed line 29 from:
  // do Thing C
to:
  // ejecutar C
Changed lines 32-35 from:

Another way to express branching, mutually exclusive tests, is with the switch case statement.

See also:

to:

Otra forma de expresar ramificaciones (branching en inglés), y realizar comprobaciones mutuamente exclusivas, es con la declaración switch case, la cual resulta más idónea en algunos casos.

Ver También:

September 09, 2008, at 01:10 AM by Paul Badger -
Deleted line 32:
September 09, 2008, at 01:10 AM by Paul Badger -
Changed lines 31-35 from:

}@]

 Another way to express branching, mutually exclusive tests, is with the switch case statement.

to:

} @]

Another way to express branching, mutually exclusive tests, is with the switch case statement.

September 06, 2008, at 11:51 PM by Paul Badger -
September 06, 2008, at 11:51 PM by Paul Badger -
Changed line 36 from:

See also:\\

to:

See also:

September 06, 2008, at 11:51 PM by Paul Badger -
Changed line 36 from:

See also:

to:

See also:\\

September 06, 2008, at 11:51 PM by Paul Badger -
Changed line 37 from:
to:
September 06, 2008, at 11:50 PM by Paul Badger -
Changed lines 16-17 from:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present.

to:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present, and sets the default behavior.

Changed lines 35-36 from:

Coding Note: When using an if/else construction, ending the construction with an else block is a handy way to set a default behavior if one is desired.

to:

See also:

 switch case
September 06, 2008, at 11:48 PM by Paul Badger -
Changed lines 16-17 from:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present. Note that an else if block may be used with or without a terminating else block. An unlimited number of such else if branches is allowed.

to:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present.

Note that an else if block may be used with or without a terminating else block and vice versa. An unlimited number of such else if branches is allowed.

September 06, 2008, at 11:47 PM by Paul Badger -
Changed lines 16-17 from:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present. Note that an else if block may be used with or without a terminating else block.

to:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present. Note that an else if block may be used with or without a terminating else block. An unlimited number of such else if branches is allowed.

Changed lines 31-32 from:

An unlimited number of such else if branches is allowed. Another way to express branching, mutually exclusive tests, is with the switch case statement.

to:
 Another way to express branching, mutually exclusive tests, is with the switch case statement.
September 06, 2008, at 11:46 PM by Paul Badger -
Changed lines 16-17 from:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present. Note that a else if block may be used with a terminating else block.

to:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present. Note that an else if block may be used with or without a terminating else block.

September 06, 2008, at 11:44 PM by Paul Badger -
September 06, 2008, at 11:00 PM by Paul Badger -
Changed lines 16-17 from:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present.

to:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present. Note that a else if block may be used with a terminating else block.

Changed lines 33-34 from:

Coding Note: When using an if/else construction, ending the construction with an else block is a handy way to set a default behavior if one is desired.

to:

Coding Note: When using an if/else construction, ending the construction with an else block is a handy way to set a default behavior if one is desired.

September 06, 2008, at 10:53 PM by Paul Badger -
Changed lines 16-17 from:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present.

to:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present.

September 06, 2008, at 10:52 PM by Paul Badger -
Changed lines 16-17 from:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default block is executed, if one is present.

to:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default else block is executed, if one is present.

September 06, 2008, at 10:51 PM by Paul Badger -
Changed lines 1-2 from:

if/else

to:

if / else

September 06, 2008, at 10:51 PM by Paul Badger -
Changed lines 31-32 from:

An unlimited number of such branches is allowed. Another way to express branching, mutually exclusive tests is with the switch case statement.

to:

An unlimited number of such else if branches is allowed. Another way to express branching, mutually exclusive tests, is with the switch case statement.

September 06, 2008, at 10:50 PM by Paul Badger -
Changed lines 16-17 from:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test is true, the default block is executed, if one is present.

to:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test proves to be true, the default block is executed, if one is present.

Changed lines 31-32 from:

You can have an unlimited nuber of such branches. (Another way to express branching, mutually exclusive tests is with the switch case statement.

to:

An unlimited number of such branches is allowed. Another way to express branching, mutually exclusive tests is with the switch case statement.

September 06, 2008, at 10:49 PM by Paul Badger -
Changed lines 33-34 from:

Coding Note: If you are using if/else, and you want to make sure that some default action is always taken, it is a good idea to end your tests with an else statement set to your desired default behavior.

to:

Coding Note: When using an if/else construction, ending the construction with an else block is a handy way to set a default behavior if one is desired.

September 06, 2008, at 10:46 PM by Paul Badger -
Changed lines 16-17 from:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and then the program skips to the line following the entire if/else construction. If no test is true, the default block is executed, if one is present.

to:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and the program then skips to the line following the entire if/else construction. If no test is true, the default block is executed, if one is present.

September 06, 2008, at 10:46 PM by Paul Badger -
Changed lines 16-17 from:

Each test will proceed to the next one until a true test is encountered. When a true test is encountered, its associated block of code is run, and then the program skips to the line following the entire if/else construction. If no test is true, the default block is executed, if one is present.

to:

Each test will proceed to the next one until a true test is encountered. When a true test is found, its associated block of code is run, and then the program skips to the line following the entire if/else construction. If no test is true, the default block is executed, if one is present.

September 06, 2008, at 10:45 PM by Paul Badger -
Changed lines 14-15 from:

else can proceed another if test, so that multiple, mutually exclusive tests can be run at the same time:

to:

else can proceed another if test, so that multiple, mutually exclusive tests can be run at the same time.

Each test will proceed to the next one until a true test is encountered. When a true test is encountered, its associated block of code is run, and then the program skips to the line following the entire if/else construction. If no test is true, the default block is executed, if one is present.

September 23, 2007, at 03:10 PM by Paul Badger -
Changed lines 3-4 from:

if/else gives you greater control over the flow of your code than the basic if statement, by allowing you to group multiple tests together. For instance, if you wanted to test an analog input, and do one thing if the input was less than 500, and another thing if the input was 500 or greater, you would write that this way:

to:

if/else allows greater control over the flow of code than the basic if statement, by allowing multiple tests to be grouped together. For example, an analog input could be tested and one action taken if the input was less than 500, and another action taken if the input was 500 or greater. The code would look like this:

Changed line 7 from:
  // do Thing A
to:
  // action A
Changed line 11 from:
  // do Thing B
to:
  // action B
April 17, 2007, at 12:02 AM by David A. Mellis -
Changed line 7 from:
  # do Thing A
to:
  // do Thing A
Changed line 11 from:
  # do Thing B
to:
  // do Thing B
Changed line 18 from:
  # do Thing A
to:
  // do Thing A
Changed line 22 from:
  # do Thing B
to:
  // do Thing B
Changed line 26 from:
  # do thing C
to:
  // do Thing C
April 16, 2007, at 04:34 PM by Paul Badger -
Changed lines 1-2 from:

if/else

to:

if/else

March 31, 2006, at 10:44 PM by Jeff Gray -
Added lines 1-2:

if/else

March 31, 2006, at 04:53 AM by Tom Igoe -
Changed lines 1-2 from:

if/else gives you greater control over the flow of your code than the basic if statement, by allowing you to group multiple together. For instance, if you wanted to test an analog input, and do one thing if the input was less than 500, and another thing if the input was 500 or greater, you would write that this way:

to:

if/else gives you greater control over the flow of your code than the basic if statement, by allowing you to group multiple tests together. For instance, if you wanted to test an analog input, and do one thing if the input was less than 500, and another thing if the input was 500 or greater, you would write that this way:

Changed lines 10-30 from:

}@]

to:

}@]

else can proceed another if test, so that multiple, mutually exclusive tests can be run at the same time:

if (pinFiveInput < 500)
{
  # do Thing A
}
else if (pinFiveInput >= 1000)
{
  # do Thing B
}
else
{
  # do thing C
}

You can have an unlimited nuber of such branches. (Another way to express branching, mutually exclusive tests is with the switch case statement.

Coding Note: If you are using if/else, and you want to make sure that some default action is always taken, it is a good idea to end your tests with an else statement set to your desired default behavior.

March 31, 2006, at 04:43 AM by Tom Igoe -
Added lines 1-10:

if/else gives you greater control over the flow of your code than the basic if statement, by allowing you to group multiple together. For instance, if you wanted to test an analog input, and do one thing if the input was less than 500, and another thing if the input was 500 or greater, you would write that this way:

if (pinFiveInput < 500)
{
  # do Thing A
}
else
{
  # do Thing B
}

Share