Re: likely value() error!

new topic     » goto parent     » topic index » view thread      » older message » newer message

>Now, I wrote this program to see what would happen if I tried to convert a
>number like 1,234 i.e, with a comma.  Not only did it not convert property,
>but the error code was GET_SUCCESS.  Hmmm.

Yes, it is a succes: it was able to succesfully 'get' a value from the string
you gave.
Example:

s = "4 Pizzaman"
? value (s)

-- Displays:  { 4, GET_SUCCES }
-- (well actuall, instead of GET_SUCCES it displays the value which is
represented by that constant)

Now, Im guessing, you wanted it to do something else with the given string. I
came up with two alternative interpretations of
the string:

    - you wanted to 'get' two values seperated by a comma in sequence-form:
      Insert this before your 'value (s)' statement.....
                                                            s = '{' & s '}'

    - you wanted to 'get' the value 1.234 as one floating point value:
(a comma is the european alternative to seperate the floating point part
     from the integer value)
     Insert this before your 'value (s)' statement.......
s = (s != ',' * s)  + (s = ','
                                                 * ',')

Im quite sure, this helps you out, if not, try to explain what you *wanted* it
to return in more detail...

Ralf Nieuwenhuijsen
nieuwen at xs4all.nl
ralf_n at email.com
UIN: 9389920

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu