#More Strings Stuff
5 messages in this thread
I will check the new Strings. I _do_ think that there are other problems in
the previous version, besides the range checking issue. The only reason I
started looking at the code was that it didn't work (not a range-check error)
in all cases.
The idea of having modules that purposely violate range and/or overflow
limits strikes me as dangerous, but perhaps it is considered standard practice.
Can you give me a little education on this point? I'd like to develop a better
feeling about it, and I'll keep an open mind. Does anyone else have comments
about this? Thanks for your quick responses, Martin.
Joel
They do not "purposely" violate. If I can avoid it without hurting performance,
then I'll do it. I see Range-Checking to be useful as a safeguard when
developing software, once the software is done, the checking is no longer
needed. Since I know how the compiler does stuff and how the M2Sprint
environment behaves, I know I can afford to do slight range checking errors to
improve performance. If the compiler' behavior changes, I can change the
modules. This works well cause I provide both the compiler and the modules. It
might not be so easy for a normal user to do though.
Thanks for the reply. I can accept your explanation, but as you say, as a user
of the compiler I would be very wary of writing that way. I also see the
range/overflow checking as a useful safeguard, to be turned off before the last
"release" compile or for evaluating the real speed of the code. For that
reason alone, I wouldn't write code that creates range errors, even if
performance suffers slightly – it makes it too difficult to separate _real_
bugs (unexpected range errors) from the known ones.
Anyway, so far the new Strings module works fine. Thanks for all your efforts.
On another subject – I'd like to ask if you could add a couple of features to
the editor:
1. I really miss a built-in command for "delete current line". I know you can
do it by selecting text and then deleting it, but I find it much easier to have
a single key to do it. Currently I assign the macro to that function, but I'd
rather save that for other things.
2. Would it be possible to have the editor automatically disable the Correct
Case and Wordcomplete functions when typing comments and quoted strings?
Probably it's too difficult to make this work for multiple-line comments. I'd
be satisfied if the feature only worked when comment and quote characters exist
on the current line.
Joel
To Delete the current line, hit CTRL-CEL. To delkete the previous line, hit
CTRL-BACKSPACE. I've wanted some way of disabling Case Correct myself. To do it
within quoted strings is easy, but for multiple line comments, nope, that's not
possible. There must be some way of making it smarter.
Sorry, I didn't remember reading about CTRL-DEL in the manual. I'm glad to
know that's in there. On the Correct Case disabling – as I said, the multiple
line comments is a frill I could do without. If you can disable inside quoted
strings and single-line comments, that's great.
Joel