Jump to content

Talk:Short-circuit evaluation: Difference between revisions

Line 79:
 
:I think that for this task, if it is not a feature of the language then this should be noted, especially if it can legitimately become a feature of a compiler or is a feature of a popular compiler. If you know that you are depending on a feature of particular compilers/compiler optimisation settings then this should be stated. You can also do a nested-if solution for the general case. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 05:27, 2 May 2015 (UTC)
::See [https://software.intel.com/fr-fr/forums/topic/282534 this discussion] about Intel Fortran and its ancestors VAX Fortran and Compaq Visual Fortran, and why it's indeed a good thing _not_ to have short-circuit evaluation. I don't know a compiler that would provide this as an option (VAX Fortran was said to have this, but Steve Lionel has stated on several occasions that it was not so). I'd say that having both like Ada would probably be better, and actually there have been discussions in 2004 about new operators .ORELSE. and .ANDTHEN., resulting in a proposition by Van Snyder [http://j3-fortran.org/doc/year/04/04-390.ps]. See also document N1972 at WG5 [ftp://ftp.nag.co.uk/sc22wg5/N1951-N2000/N1972.pdf]. Maybe they will eventually get their way into the standard. Anyway, they are not part of the current draft of Fortran 2015 [http://j3-fortran.org/doc/year/15/15-007.pdf]. [[User:Arbautjc|Arbautjc]] ([[User talk:Arbautjc|talk]]) 21:45, 2 May 2015 (UTC)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.