Re: yet another dumn question

2002-11-21 Thread Angus Leeming
On Thursday 21 November 2002 3:57 pm, Jean-Marc Lasgouttes wrote: > > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> I think that the only way to group { command2 && exit 3 } is to > Angus> write a function doing this. Writing either of command1 || ( > Angus> command2 && exit 3

Re: yet another dumn question

2002-11-21 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> I think that the only way to group { command2 && exit 3 } is to Angus> write a function doing this. Writing either of command1 || ( Angus> command2 && exit 3 ) command1 || ` command2 && exit 3 ` groups Angus> things as we desire, bu

Re: yet another dumn question

2002-11-21 Thread Angus Leeming
On Thursday 21 November 2002 3:14 pm, Jean-Marc Lasgouttes wrote: > > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> Funny, but doesn't work. I needed to do this: > > Strange... > > JMarc command1 || command2 && exit 3 I think that the shell reats this as { command1 |

Re: yet another dumn question

2002-11-21 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Funny, but doesn't work. I needed to do this: Strange... JMarc

Re: yet another dumn question

2002-11-21 Thread Angus Leeming
On Thursday 21 November 2002 2:28 pm, Jean-Marc Lasgouttes wrote: > > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> Why do you find this: if (cd ${DIRNAME} && ${FDESIGN} -convert > Angus> ${FDFILE}); then : ; else ... fi > > Angus> superior to this: (cd ${DIRNAME} && ${FDESIGN

Re: yet another dumn question

2002-11-21 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Why do you find this: if (cd ${DIRNAME} && ${FDESIGN} -convert Angus> ${FDFILE}); then : ; else ... fi Angus> superior to this: (cd ${DIRNAME} && ${FDESIGN} -convert Angus> ${FDFILE}) if [ $? -ne 0 ]; then ... fi Angus> It seems t

Re: yet another dumn question

2002-11-21 Thread Angus Leeming
On Thursday 21 November 2002 11:59 am, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > | On Thursday 21 November 2002 11:27 am, Jean-Marc Lasgouttes wrote: > >> > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > >> > >> Angus> Which is "better"? (cd ${DIRNAME}; ${

Re: yet another dumn question

2002-11-21 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | On Thursday 21 November 2002 11:27 am, Jean-Marc Lasgouttes wrote: >> > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: >> >> Angus> Which is "better"? (cd ${DIRNAME}; ${FDESIGN} -convert >> Angus> ${FDFILE}) or (cd ${DIRNAME} && ${FDESIGN} -con

Re: yet another dumn question

2002-11-21 Thread Angus Leeming
On Thursday 21 November 2002 11:27 am, Jean-Marc Lasgouttes wrote: > > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> Which is "better"? (cd ${DIRNAME}; ${FDESIGN} -convert > Angus> ${FDFILE}) or (cd ${DIRNAME} && ${FDESIGN} -convert ${FDFILE}) > > Angus>if [ $? -ne 0 ]

Re: yet another dumn question

2002-11-21 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Which is "better"? (cd ${DIRNAME}; ${FDESIGN} -convert Angus> ${FDFILE}) or (cd ${DIRNAME} && ${FDESIGN} -convert ${FDFILE}) Angus> if [ $? -ne 0 ]; then echo "\"${FDESIGN} -convert ${FDFILE}\" Angus> failed. Please investigate."

Re: yet another dumn question

2002-11-21 Thread Angus Leeming
On Thursday 21 November 2002 10:53 am, Andre Poenitz wrote: > On Thu, Nov 21, 2002 at 10:57:00AM +, Angus Leeming wrote: > > Which is "better"? > > (cd ${DIRNAME}; ${FDESIGN} -convert ${FDFILE}) > > or > > (cd ${DIRNAME} && ${FDESIGN} -convert ${FDFILE}) > > > > if [ $? -ne 0 ]; the

Re: yet another dumn question

2002-11-21 Thread Andre Poenitz
On Thu, Nov 21, 2002 at 10:57:00AM +, Angus Leeming wrote: > Which is "better"? > (cd ${DIRNAME}; ${FDESIGN} -convert ${FDFILE}) > or > (cd ${DIRNAME} && ${FDESIGN} -convert ${FDFILE}) > > if [ $? -ne 0 ]; then > echo "\"${FDESIGN} -convert ${FDFILE}\" failed. P

yet another dumn question

2002-11-21 Thread Angus Leeming
Which is "better"? (cd ${DIRNAME}; ${FDESIGN} -convert ${FDFILE}) or (cd ${DIRNAME} && ${FDESIGN} -convert ${FDFILE}) if [ $? -ne 0 ]; then echo "\"${FDESIGN} -convert ${FDFILE}\" failed. Please investigate." exit 1 fi I'm not used t

Re: Dumn question

2000-11-06 Thread Andre Poenitz
> During te change to string const I did not ave to change any code. So it does not cost anything except the 'clutter' of additional 'const's. I really wish 'const' was the default and there was a 'mutable' modifier to express non-constness. But that's probably 20 years late now. > I followed t

Re: Dumn question

2000-11-06 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | I don't really know. There are only a few places where this would be | a (disputable) advantage for consistency reasons. :-) true I guess but it is part of the "programming-by-contract" paradigm and also a way to ensure that tempraries are not modi

Re: Dumn question

2000-11-06 Thread Andre Poenitz
> Why have all functions returning a string changed from > string func(); > to > string const func(); I don't really know. There are only a few places where this would be a (disputable) advantage for consistency reasons. In general _I_ prefer returning a "nonconst" string that can be

Dumn question

2000-11-06 Thread Angus Leeming
Why have all functions returning a string changed from string func(); to string const func(); ? Equally, why hasn't this been done to functions returning an int, or a bool etc? Angus