[Info-vax] Quoting question

Jan-Erik Soderholm jan-erik.soderholm at telia.com
Wed Jan 21 17:23:04 EST 2015


hb skrev den 2015-01-21 21:01:
> On 01/21/2015 07:12 PM, Jan-Erik Soderholm wrote:
>> Bob Gezelter skrev den 2015-01-21 18:02:
>>> The case "problem" is solved by using F$EDIT and F$EXTRACT to capitalize
>>> the first letter and force lower case on the remainder (presuming
>>> English capitalization).
>>
>> Yes, but I had no time to work it out as a one-liner.
>> Using multiple line it's easy, of course, and I do
>> not think JF had asked in that case...
>
> F$EDIT doesn't solve the case problem: as we all know, DCL symbols aren't
> case sensitive. As far as I understood the OP, the expectation was to
> preserve the symbol name as entered. Like in:
>    $ Chocolate = "good"
>    $ Flavour = "Chocolate"
> and a
>    $ write sys$output "''Flavour' is ''&Flavour'"
> was expected to print
>    Chocolate is good
>
> This can be done in (GNU/GNV) bash - and probably in other shells as well -
> for example with:
>    $ Chocolate=good
>    $ Flavor=Chocolate
>    $ echo $Flavor is $(eval echo \$$Flavor)
>    Chocolate is good
>    $

Yes, *mixed* case is a case I do not think is solvable.
But it wasn't mixed case in the original question so it is
hard to tell if that was expected to work also...

Jan-Erik.




More information about the Info-vax mailing list