On 8/10/11 6:23 PM, Linda W wrote:
> 
> 
> When I have the construct, in 4.1:
> 
> 
>  1 #!/bin/bash
>  2 30 31 # trace control for subs
> 32 declare -ix Allow_Trace=$(((
> 33                         _D_LowLevel   |
> 34                         _D_Provides   |
> 35                         _D_ 36                       )))
> 37 38 declare -ix Trace_off=$(((
> 39                           _D_
> 40                       )))
> 41 42     # for setting a local '_Debug' flag in a routine
> 43 declare -ix Debug=$(((
> 44                       _D_
> 45                   )))
> 46 47 907 # vim: ts=2 sw=2 fdm=marker nofen
>     
> 
> The syntax highligher doesn't like my ) brace.
> 
> If I put a space after $( and before th final ), then the error goes away,
> but it changes
> the semantics of the statment (one does an arith cal, and reurns value, but
> with spaces,
> it does the arith and returns the status of the of wheither or not the
> 'calc' returned 0 (fail)
> or 1(pass).
> 
> For hosethat want to complain about HTML, bing used on vim llist -- - just
> ignore the post..
> 
> 
> Is this fixable???

You have to decide: do you want command substitution or arithmetic
expansion?  If it's the former, write it that way using $( ... ); if
the latter, make it clear using $(( ... )).  You'll thank yourself later.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to