Hi,

on Mon, 20 May 2002 13:29:07 +0200
Melvin Hadasht <[EMAIL PROTECTED]> wrote:

 > Unhandled Error: The value "0.50" is not a number between 0 and 1 and is thus
 > invalid for the key "order-num".

I just looked into this:

in aspell/common/info.cpp +105 there's the following code:

  static const ModuleInfoDefItem module_info_list_def_list[] = {
    {"default", 
     "order-num 0.50;" 
     "dict-exts .multi"}
  };

Note that 0.50 is followed be a semi-colon.
The test concerning 0.50 is line 196:

      if (key == "order-num") {
        char * tailptr;
        to_add->c_struct.order_num = strtod(data.c_str(), &tailptr);
        if (*tailptr != '\0' ||
            !(0 < to_add->c_struct.order_num && 
              to_add->c_struct.order_num < 1)) 
          {
            err.prim_err(bad_value, key, data,
                         "a number between 0 and 1");
            goto ERROR;
          }

note the if (*tailptr != '\0' || ... which is obviously true because of the
semi-colon, hence the error. I don't understand why aspell0 does not issue the
error, and why my code does. My works OK with old pspell. I just changed the
function calls so I use aspell.h instead of pspell.h compatibility headers.

Shalom (Hebrew: Peace)


-- 
Melvin Hadasht

_______________________________________________
Aspell-devel mailing list
[EMAIL PROTECTED]
http://mail.freesoftware.fsf.org/mailman/listinfo/aspell-devel

Reply via email to