Announcement

Collapse
No announcement yet.

convert string to number

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Matthew Berg
    replied
    i% is a 16 bit integer, it can only hold a value upto 32768.
    The range of an INTEGER class variable is -32,768 to +32,767.

    ------------------
    If you try to make something idiot-proof, someone will invent a better idiot.

    Leave a comment:


  • Nidal Qunibi
    replied
    thanks for your help
    it is working fine now

    thanks


    ------------------
    Nidal

    Leave a comment:


  • Paul Dixon
    replied
    Nidal,
    i% is a 16 bit integer, it can only hold a value upto 32768.

    Try using i&=val(a$): print i&

    i& is a 32 bit integer which will hold numbers of 40000 and above.

    Paul.


    ------------------

    Leave a comment:


  • Clay Clear
    replied
    The problem is that i% is an integer. Integers can only hold up
    to the number 32,767 (I do not recall what the lowest number
    they'll hold is). To hold numbers larger than that, use a
    bigger variable type, such as a LONG or a QUAD.


    ------------------
    mailto:[email protected][email protected]</A>

    [This message has been edited by Clay Clear (edited January 25, 2003).]

    Leave a comment:


  • Nidal Qunibi
    started a topic convert string to number

    convert string to number

    hi for all

    i have problem that when im using VAL command
    to convert any string numbers
    if the string > 35000
    it will give wrong data

    exp.

    a$ = "40000"
    i% = VAL(a$)

    i will not have i% = 40000

    is there any other function could convert the string to a number

    thanks for all


    ------------------
    Nidal
Working...
X