[Info-vax] Quoting question

Bob Gezelter gezelter at rlgsc.com
Thu Jan 22 08:01:30 EST 2015


On Thursday, January 22, 2015 at 4:34:49 AM UTC-5, Jan-Erik Soderholm wrote:
> Bart Zorn skrev den 2015-01-22 07:45:
> > On Wednesday, January 21, 2015 at 5:32:23 PM UTC+1, JF Mezei wrote:
> >> Say I have:
> >>
> >> $chocolate = "good"
> >> $cherry = "red"
> >> $flavour = "chocolate"
> >>
> >> is there a way to have
> >>
> >> $write sys$output "''flavour' is ?????????"
> >>
> >> come out  as "chocolate is good"  ?
> >>
> >> or would I have to do a substitution to a temporary variable first and
> >> use that temp variable in the write sys$output command ?
> >
> > What is wrong with:
> >
> > $ write sys$output flavour, " is ", chocolate
> >
> > No quoting or substitution necessary.
> >
> > Bart
> >
> >
> 
> What is wrong is that you was clearly ment to only supply
> the value of the symbol flavour, you was not ment to
> know alrady that the symbol contained "chocolate", as
> you does.
> 
> You are ment to be able to do $flavour = "cherry" and
> *without changing the DCL statement* get "cherry is red".
> 
> Wasn't that absolutely clear?
> 
> Jan-Erik.

Jan-Erik,

Actually, I made the same mis-read (JF was slightly ambiguous in his wording, using only the "chocolate is good" example).

Given your reading, I concur with the use of the ' and & substitution.

- Bob Gezelter, http://www.rlgsc.com



More information about the Info-vax mailing list