Nikolai Weibull wrote:
On 9/11/06, Mark Manning <[EMAIL PROTECTED]> wrote:
It is fairly easy to check for inconsistencies in Binary, Octal, and Hex
because they have a fixed format. Decimal is not as easy due to there
being integers, reals, and general format numbers (ie: #e+/-#) which are
all grouped into the "Decimal" category. I'll think about it though.
Maybe I can come up with something. :-)
Actually, as I was sitting here typing this it popped into my head that
such a test would actually fall under the Variable category rather than
the Decimal category since variables can start with any character or an
underscore; the opposite would be to start with something like a decimal
number. A possibility maybe. :-)
What /are/ you talking about?
If you're discussing syntax highlighting, numbers usually fall under
then Number group. Some syntax definitions highlight a leading zero
as Special, as it does have special meaning, as it in some languages
denotes an octal number.
I have no idea of what you mean by "inconsistencies".
This "stream of thought" mode you're using is more suited for IRC, see
http://www.vim.org/community.php.
nikolai
Ok, here goes:
Binary numbers usually have a leading specifier and can only contain a
zero or one.
Octal numbers usually have a leading specifier and can only contain the
numbers 0-7
Hex numbers usually have a leading specifier and can only contain 0-9
and A-F.
Decimail usually do not have a leading specifier, can have 0-9, a
period, an "E", plus or minus, and in pretty much whatever combination
you would like for it to be. So it is easier to say what it is than
what it is not. Because unlike Binary, Octal, or Hex - there is no
standard way to represent a decimal number. That is why there are three
entries in the syntax files for how a number can be declared. We were
talking about doing the opposite though. Creating an error syntax that
would highlight the problems rather than just identifying whether or not
a number was a decimal number. So my thoughts are that it can not be
done in one command or maybe not easily.
Got it now?
Mark