[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## RE: [Axiom-developer] Axiom BNF

**From**: |
Bill Page |

**Subject**: |
RE: [Axiom-developer] Axiom BNF |

**Date**: |
Mon, 25 Oct 2004 14:39:41 -0400 |

On Monday, October 25, 2004 2:01 PM Martin Rubey wrote:
>* *
>* I did run into an example:*
>* *
>* Consider two nested if statements, where one else branch is missing:*
>* *
>* if cond1 then*
>* if cond2 then*
>* bla1*
>* bla2*
>* else*
>* bla3*
>* bla4*
>* *
>* versus*
>* *
>* if cond1 then*
>* if cond2 then*
>* bla1*
>* bla2*
>* else*
>* bla3*
>* bla4*
>* *
>* It only discovered it by luck.*
>* *
Of what is this an example? It just seems like two
reasonable examples of indented coding to me.
(I added 1, 2, 3, 4 to bla to be specific.)
In the first case bla1 and bla2 execute if both cond1
and cond2 are true. bla3 and bla4 execute if cond1 is
true and cond2 is false.
In the second case bla1 and bla2 execute if both cond1
and cond2 are true (same as first case) but now bla3 and
bla4 execute if cond1 is false, independent of cond2.
This is clear because the 'else' block has the same
indentation as the first 'if' block. No?
Regards,
Bill Page.

**[Axiom-developer] Axiom BNF**, *Christopher Chamber*, `2004/10/24`
**Re: [Axiom-developer] Axiom BNF**, *Ralf HEMMECKE*, `2004/10/25`
**RE: [Axiom-developer] Axiom BNF**, *Bill Page*, `2004/10/25`
**Re: [Axiom-developer] Axiom BNF**, *Ralf HEMMECKE*, `2004/10/25`
**RE: [Axiom-developer] Axiom BNF**, *Bill Page*, `2004/10/25`
**RE: [Axiom-developer] Axiom BNF**, *Martin Rubey*, `2004/10/25`
**RE: [Axiom-developer] Axiom BNF**,
*Bill Page* **<=**
**RE: [Axiom-developer] Axiom BNF**, *Martin Rubey*, `2004/10/25`
**RE: [Axiom-developer] Axiom BNF**, *Bill Page*, `2004/10/25`
**RE: [Axiom-developer] Axiom BNF**, *Martin Rubey*, `2004/10/26`