I'm using incremented tcl and have been running into problems lately.
With many of my procedure calls I was finding that, given long
variable names, I was having lines far exceeding 70 characters. For
example:
set l_danglingRange [generate_expected_key_event_ranges -dangling
$i_keyType $i_confHT $i_pressTime $i_releaseTime ]
Which I try to clean up as:
set l_danglingRange [generate_expected_key_event_ranges -dangling \
$i_keyType \
$i_confHT \
$i_pressTime \
$i_releaseTime ]
In some cases I have problems with the '\' version while the other is
fine.
But it seems that the following is OK:
set l_stops [ list \
[ expr { $CLASS_PTI_OFFSET + 1 } ] \
[ expr { $CLASS_EVENT_CODE_OFFSET + 3 } ] \
[ expr { $CLASS_KEY_CODE_OFFSET + 1 } ] ]
Can someone explain or point me to a good reference that can explain
when I can and when I can not escape the end of a line in this way?
Thanks alot,
Steve
"In some cases" sounds like you might have some trailing spaces after
some of your backslashes? A long as your '\'s are immediately followed
by '\n' or '\r\n' you should be fine. Not just some times.
hth
Ronnie
You have to be careful of quoted strings -- you could end up with extra
characters.
You also need to be sure that the newline is right after the backslash
and that you DON'T have spaces or tabs between the backslash and the newline.
>
> Thanks alot,
>
> Steve
>
--
Robert Heller -- Get the Deepwoods Software FireFox Toolbar!
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
hel...@deepsoft.com -- Contract Programming: C/C++, Tcl/Tk
Thanks, that was it.