Comment Lines interfere with continuation lines

dunbarx at aol.com dunbarx at aol.com
Wed Jun 27 18:12:58 CDT 2012


Hi.


This goes back to HC. You cannot interrupt a line-continued, er, line, with a comment.


Once committed, you have to complete the whole thing in one shot.


Logically, this seems counterintuitive. It just must be how the parser thinks.


Craig Newman



-----Original Message-----
From: Peter Haworth <pete at lcsql.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Wed, Jun 27, 2012 6:45 pm
Subject: Comment Lines interfere with continuation lines


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>
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 


More information about the use-livecode mailing list