User Tag List

Results 1 to 6 of 6

Thread: some confusion about things in the expression calc

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    ZayLong's Avatar
    Join Date
    Jun 2008
    Location
    USA
    Posts
    276
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    some confusion about things in the expression calc

    some of the expressions in the calculator thing in MMF, i dont understand

    like Str$, Left$, Mid$, Right$, Len, Hex$, Bin$, etc.

    what do they mean? O_o and what are their use? if someone can either tell me here, or direct me to some sort of online "guide" then i would appreciate it alot. im sure some of these expressions would be very useful to me if i knew what they were for.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Nov 2010
    Location
    Switzerland
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: some confusion about things in the expression calc

    Hi Zaylong,

    Realy useful are:

    Str$ and Val

    with them you can convert values into strings and vice-versa. For example: The Edit-Box accepts "Numbers" and Strings. But every number in the Edit-Box is in the "String"-Format and is not threated as a value. The Counter-Object for example needs Values and can not accepts the "String"-Format. But you can convert a String (for example from the editbox) to a value (for example for the Counter-Object) and vice versa.

    To convert from String to Value: Val(>String here<)
    To convert from Value to String: Str$(>Value here<)

    The Hex$(>Value<) can convert a value into Hex-Value and the
    Bin$(>Value<) can convert a value into a binary-value.

    The Other Expressions like Left$, Mid$, Right$ and Len, i have not used so far. Perhaps somebody Else can Explain them.

    Greets

    jahkri

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    ZayLong's Avatar
    Join Date
    Jun 2008
    Location
    USA
    Posts
    276
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: some confusion about things in the expression calc

    well that was very enlightening information, thank you very much

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: some confusion about things in the expression calc

    Len() gets the number of characters (letters, numbers, spaces, punctuation, everything) in a string
    Left$() Mid$() Right$() let you chop a string up into pieces.

    As an example of a few of them being used together, this expression adds leading zeros to a (positive) number:
    left$("00000000", 8 - len(str$(score))) + str$(score)

    It converts the score number (e.g. 12735) to a string ("12735") using str$(), counts how many characters are in it (5) using len(), subtracts that from 8 (3), chops that many characters from the left of "00000000" ("000") using left$() and joins that to the string version of the score ("000"+"12735" = "00012735").

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Re: some confusion about things in the expression calc

    Or you could just say:

    right$( "0000000" + str$(score), 8 )

  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: some confusion about things in the expression calc

    that version breaks if the score gets over 8 characters, but yes, you could O.o

Similar Threads

  1. Calc text rect object
    By richardh in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 1st July 2012, 05:17 PM
  2. Scaling Calc.
    By Chrille in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 18th April 2012, 02:35 PM
  3. player/enemy distance calc
    By arfa in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 20th October 2010, 12:56 PM
  4. Request - Excel or OpenOffice Calc Extension
    By droberson in forum Extension Development
    Replies: 10
    Last Post: 4th August 2008, 06:30 PM
  5. No correct float calc although multiplied by 1.0 ?
    By Tiles in forum Multimedia Fusion 2 - Technical Support
    Replies: 21
    Last Post: 27th January 2008, 07:53 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
  •