User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18

Thread: working with Big, Big Numbers..

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Location
    London - UK
    Posts
    427
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    working with Big, Big Numbers..

    I am working with numbers (or rather disk sizes in bytes) such as:

    39991275520

    As soon as I use this number, MMF changes it into a strange negative decimal number .. How can I store and use big numbers such as the one above? I would like to do the following expression:

    39991275520/1048576

    this is a simple expression that converts bytes to Megabytes...

    Any ideas?

    Thanks guys!

    -Mel

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: working with Big, Big Numbers..

    Try the LUA or expression evaluator objects.
    .:::.Joshtek.:::.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Sep 2006
    Location
    Norway
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with Big, Big Numbers..

    Isn't there a big int extension.. Int64? I don't remember but I think there is.
    Jean Villy Edberg

  4. #4
    No Products Registered

    Join Date
    Jul 2006
    Location
    London - UK
    Posts
    427
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with Big, Big Numbers..

    Hi guys, thanks for the suggestions so far..

    I tried the all suggestions (Except LUA) and I got a 0 as the result .. By the way, I'm getting the value from Sphax's Kernal object .. The 'Free Disk Space' expression ..

    can anyone get around this? Maybe Sphax can help?

    -Mel

  5. #5
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Sep 2006
    Location
    Norway
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with Big, Big Numbers..

    It works for me with INT64 Object.
    Code:
    Start of frame:
    INT64->Set stored number "39991275520"
    INT64->Divide "1048576"
    STRING->Set text Stored$( "Int64 object" )
    Result = 38138
    Jean Villy Edberg

  6. #6
    No Products Registered

    Join Date
    Jun 2006
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with Big, Big Numbers..

    Works fine for me when I use the Int64 object.
    Set your stored number as "39991275520", divide by "1048576" and then set a string to Stored$( "Int64 object" ).

    Or if you want to set a counter to that value, set it to Val(Stored$( "Int64 object" ))

    Edit: Villy beat me to it

  7. #7
    No Products Registered

    Join Date
    Jul 2006
    Location
    London - UK
    Posts
    427
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with Big, Big Numbers..

    Hi guys!

    Yeh it works when you have a number like that, but my problem continues as I'm dynamically getting the number from Sphax's Kernal object..

    Try using the Kernal object's 'getDiskFreeSpace( "Kernel object", >Path<)' expression and see for yourselves.. Can you guys get it to work that way?

    Thanks!

    -Mel

  8. #8
    No Products Registered

    Join Date
    Jul 2006
    Location
    London - UK
    Posts
    427
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with Big, Big Numbers..

    BTW ..

    I'm doing this...

    Div$( "Int64 object", Str$(getDiskFreeSpace( "Kernel object", Appdrive$)), "1048576")

    This in theory should work, as it's converting the number of bytes of C: into megabytes .. I'm still getting 0..

  9. #9
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: working with Big, Big Numbers..

    LUA code:
    Code:
    function Divide(Oper1,Oper2)
    return Oper1/Oper2;
    end
    MMF events:
    * Upon pressing button 1
    - LUA: Call function "Divide" with params: Str$(getDiskFreeSpace( "Kernel object", Appdrive$))+"|1048576" [return count 1]
    - Edit Box: Set value to LuaStrRet( "Lua object", 0)
    .:::.Joshtek.:::.

  10. #10
    No Products Registered

    Join Date
    Jul 2006
    Location
    London - UK
    Posts
    427
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: working with Big, Big Numbers..

    Hi Joshtek! Thanks for posting ..

    LUA is returning a negative number which implies to me that possibly the information coming from the kernal object is incorrect..

    Can anyone else verify this? Is it returning the amount of free space in megabytes? right click on your C drive and hit properties.. It should be the same there..

    -Mel

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Random Numbers and expiring the result numbers.
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 26th April 2013, 04:11 PM
  2. Random Numbers Greater then Random Numbers...
    By Hordolur in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 15th April 2009, 06:24 AM
  3. hex numbers?
    By Chokito in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 1st August 2008, 05:39 PM
  4. How do I get only these numbers: 2 to 48?
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th December 2007, 10:27 AM
  5. working with numbers...
    By novelidea in forum Multimedia Fusion 2 - Technical Support
    Replies: 18
    Last Post: 6th October 2007, 12:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •