Comment Lines interfere with continuation lines

Peter Haworth pete at lcsql.com
Wed Jun 27 18:44:36 EDT 2012


I've got into the habit of surrounding changes to my scripts with a couple
of comment lines that include a reference to the bug/enhancement request
that cuased them to be changed.

I recently ran into this interesting situation.

My original code looked like:

dispatch function "xyz" to button "123" \
    with p1,p2

After commenting, the code looked like this:

dispatch function "xyz" to button "123" \
  --Bug# 567
    with p1,p3
  --/Bug# 567

The "with p1,p3" line was colored correctly, not as a green comment line

When testing the bug fix, I put a breakpoint at the start of funtion "xyz"
and found that the paramaters to it were all empty, depstite the fact that
when checked right at the dispatch command they had non-empty values in
them.

After spending some time trying to figure this out and totally exhausting
my arsenal of swear words that usually fix this type of problem, I
desparately moved the comment lines to before the dispatch command and
after the "with p1,p3" line and all resumed working as expected.

It seems that inserting a comment line after a continued line causes the
remainder of the continued line to be ignored.

Not really very interesting but I thought reporting this may avoid some
unnecessary frustrations.

Pete
lcSQL Software <http://www.lcsql.com>



More information about the use-livecode mailing list