procmail
[Top] [All Lists]

Re: Two Questions

1998-03-27 05:00:28
|Thu 98-03-26 John Davis <jrdavis(_at_)netcom(_dot_)com> list.procmail
| On 26 Mar 1998 jari(_dot_)aalto(_at_)poboxes(_dot_)com wrote:
| > | LOG=unixclub$NL
| > 
| > Just personal, (you can ignore this advice if you want) I'd use 
| > 
| >     LOG = "unixclub$NL"
| 
| What advantage does the double quotes give?

Nothing :-) I just fid that I want to write like I do in Perl, awk
and shell so that all code looks alike. The reasoning is below, from
pm-tips.txt. The code checkker is my Emacs procmail minor mode that
has quite nice "lint" feature that I use to check flaws in my code.

jari


        Procmail also accepts that assignments can be be done without quotes,
        like this:

            var = value
            num = 1
            dir = /var/mail

        But I have adopted a style, where literal strings are assigned with
        double quotes:

            var = "value"

        because the procmail code checker then won't warn you about missing
        dollar, which you might have very well fogotten. For the numeric
        values or directories, there is no misinterpretations, so the quotes
        are not essential.

            #   If you do this...
            var = value

            #   then it's not certain what was intended.
            #   In this doc only these formats are used
            var = "value"   # literal assignment
            var = $value    # another variable assignment
<Prev in Thread] Current Thread [Next in Thread>