You can - and should - expect of a compiler that it does such kind of optimizations, but of course not of the HLASM toolkit macros - they only allow for a structured form of control statements without branches (jumps) and labels, but you have to do the necessary optimizations yourself. That's what ASSEMBLER programming is all about :-)
Kind regards Bernd Am 25.04.2012 13:54, schrieb DEBERT Jean-Louis:
Yes, that's it ! If A<>B I don't care about R1 and C, and if (it's known that) A=B I only have to test R1<= C I had put mental parentheses around the 2nd and 3rd conditions connected by the AND, never seeing that the 2nd condition was not even needed in the first place ... Many thanks ! -----Message d'origine----- De : IBM Mainframe Assembler List [mailto:[email protected]] De la part de Rob Scott Envoyé : mercredi 25 avril 2012 11:14 À : [email protected] Objet : Re: Boolean logic in structured programming macroes The macros are only doing exactly what you are telling them - unfortunately in this case the second CLC in your "IF" is redundant and there is no need to code it. If "A<>B" is not satisfied, then there is no need to test "A=B" before your next condition. You should be able to code the following : IF (CLC,A,NE,B),OR,(CH,R1,LE,C) STH R3,NUMBER ENDIF , Rob Scott Lead Developer Rocket Software 275 Grove Street * Newton, MA 02466-2272 * USA Tel: +1.781.684.2305 Email: [email protected] Web: www.rocketsoftware.com
