----------------------------Thanks Buddy & Emmitt.

To make a comment really stand out and, in particular, to divide a command file 
into sections I used something like this:

-- ---------------------------------------------------------------------------
-- Pre-run set-up:
-- ---------------------------------------------------------------------------

where the length of the first and third lines is 78 characters.

For SET VAR, for example, I put the comment on the same line and line them up 
to make a "column" on the right-hand edge.

Now, Emmitt, it must take a very special brain <g> to come up with your example 
so I copied and pasted both into a file. RBEdit nicely highlights what it sees 
as comments. I'm not sure that it would ever have occurred to me to put any 
comment in the middle of any command but, I suppose, that is, in effect, what I 
was asking about: does any command need a CR/LF - in another way.

Regards,
Alastair.


----- Original Message ----- 
From: Walker, Buddy 
To: RBASE-L Mailing List 
Sent: Thursday, June 04, 2009 12:25 AM
Subject: [RBASE-L] - RE: Double Hyphen Comments: good practice


Alastair

  I do the same as you keep comments on their own line.  I actually like the 
comment to be left justified. This way it is easier to pick up. 

 

Buddy

 

  ----- Original Message ----- 
  From: Emmitt Dove 
  To: RBASE-L Mailing List 
  Sent: Thursday, June 04, 2009 1:31 AM
  Subject: [RBASE-L] - RE: Double Hyphen Comments: good practice


  There appear to be some limits.  Try this code:

   

    IF {this is a test} .#PI <> 0 THEN

      WRITE -- really testy! 'It Works!'

    ENDIF

    RETURN

   

  You'll get a syntax error on the WRITE statement, which, of course, means 
that the IF worked.

   

  Now try this:

   

    IF {this is a test} .#PI <> 0 THEN

      WRITE {really testy!} 'It Works!'

    ENDIF

    RETURN

   

  Emmitt Dove

  Manager, Converting Applications Development

  Evergreen Packaging, Inc.

  [email protected]

  (203) 214-5683 m

  (203) 643-8022 o

  (203) 643-8086 f

  [email protected]

   

  From: [email protected] [mailto:[email protected]] On Behalf Of Alastair Burr
  Sent: Wednesday, June 03, 2009 6:47 PM
  To: RBASE-L Mailing List
  Subject: [RBASE-L] - Double Hyphen Comments: good practice

   

  I've not come across any problem and the help makes no observations other 
than leaving at least one space if placed on the same line as a command...

   

  but:

   

  Are there any situations  where it is preferable not to place a comment on 
the same line as the command?

   

  I only ask because, generally, I tend to avoid doing so with, for example IF, 
SWITCH, WHILE. Am I being over-cautious?

   

   

  Regards,

  Alastair

   

  ----------------------------

  Alastair Burr

  St. Albans, UK.

  [email protected]

  -----------------------------

   



------------------------------------------------------------------------------



  No virus found in this incoming message.
  Checked by AVG - www.avg.com 
  Version: 8.5.339 / Virus Database: 270.12.51/2151 - Release Date: 06/02/09 
17:53:00

Reply via email to