>On 9/3/07,Vimal<[EMAIL PROTECTED]> wrote:
>>while E do
>>S
>>if F then
>>break
>>end
>>T
>>end
>>
>>He then asked us to *prove* that the above programming fragment cannot
>>
>>be implemented just using if and while statement, even if S and T can
>>be duplicated a finite number of times
>But it IS possible.  Just add a boolean flag:

Possibly, you are not allowed to change the sequence of machine operations at 
all. See, if you change "while(A){B}" to "if(A){B};while(A){B}", the sequence 
is exactly the same; but it's not possible in this case.
It reminds me of a paper by Knuth, where he states that "goto" statement is 
necessary; don't remember the title, however.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to