On Feb 15, 2013, at 16:30, Lawrence Velázquez wrote: > On Feb 15, 2013, at 5:11 PM, Ryan Schmidt wrote: > >>> + if {[string first "macports-gcc" $compiler] == 0 || >>> + [string first "dragonegg-" $compiler] == 0} { >>> + return no >>> + } else { >>> + return yes >>> } >> >> Can't this be: >> >> return [string first "macports-gcc" $compiler] == 0 || >> [string first "dragonegg-" $compiler] == 0 >> >> >>> +proc portconfigure::compiler_is_port {compiler} { >>> + if {[portconfigure::compiler_port_name ${compiler}] == ""} { >>> + return no >>> + } else { >>> + return yes >>> + } >>> +} >> >> Can't this be: >> >> proc portconfigure::compiler_is_port {compiler} { >> return [portconfigure::compiler_port_name ${compiler}] == "" >> } > > I think you have the logic backwards. Both of those expressions would have to > be negated before returning the result. Jeremy's original if statements > return "no" when the conditionals evaluate to "true".
Absolutely right. Let's try that again: On Feb 15, 2013, at 02:10, Jeremy Huddleston Sequoia wrote: > + if {[string first "macports-gcc" $compiler] == 0 || > + [string first "dragonegg-" $compiler] == 0} { > + return no > + } else { > + return yes > } Can't this be: return [string first "macports-gcc" $compiler] != 0 && [string first "dragonegg-" $compiler] != 0 > +proc portconfigure::compiler_is_port {compiler} { > + if {[portconfigure::compiler_port_name ${compiler}] == ""} { > + return no > + } else { > + return yes > + } > +} Can't this be: proc portconfigure::compiler_is_port {compiler} { return [portconfigure::compiler_port_name ${compiler}] != "" } _______________________________________________ macports-dev mailing list macports-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-dev