Announcement

Collapse
No announcement yet.

LUA Function tostring(): converting numeric variable to string type

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

  • LUA Function tostring(): converting numeric variable to string type

    I have variable

    Code:
    v = 777777777777777;
    I need to convert it into string type variable:

    Code:
    t = tostring(v);
    After that variable named "t" contain a string = "7.7777777777778e+014". How to make conversion without exponentiation?

    Thanks

  • #2
    PHP Code:
    require "bc";
    local bignum bc.number("777777777777777");
    bignum bignum 1;
    Dialog.Message("Big number"tostring(bignum)); 

    Comment


    • #3
      why not ?

      Code:
      v = 777777777777777;
      t = v.."";

      Comment

      Working...
      X