User Tag List

Results 1 to 6 of 6

Thread: comparing to range of numbers

  1. #1
    No Products Registered

    Join Date
    Jul 2014
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    comparing to range of numbers

    I have a program that randomizes number set A

    Now I want to compare if A is equal to any number ranging from x to y.

    How do I do that without making a comparison for every number individually?

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2011
    Location
    France
    Posts
    354
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you mean by number ranging from x to y ? Is it to compare A to values from 5 to 25 for ex. ?
    If so, you can add all your values in a list. During a loop you compare A to each values included in your list. Each time you compare, you delete a line in the list, and so on.
    The repetition number of your loop has to be the number of your list lines.

  3. #3
    No Products Registered

    Join Date
    Jul 2014
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That doesn't seem to solve the problem of me having to write every number in.

    What I mean by x to y is to check if A equals any numbers in that range.

    So there's no command that works in way of
    Code:
    range(x,y)
    or something similar?

  4. #4
    No Products Registered

    Join Date
    Jul 2014
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do I check only range(Alterable value A, 5, 20)?

    I can only get it to check if value X = range(Alterable value A, 5, 20).

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator

    Join Date
    Jul 2006
    Posts
    1,018
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the variable itself:

    Alterable value A = range(Alterable value A, 5, 20)


    If Alterable value A = 3
    The condition means --> If 3 = 5

    If Alterable value A = 15
    The condition means --> If 15 = 15

    If Alterable value A = 23
    The condition means --> If 23 = 20

    So the condition is only true when if Alterable value A is in a range from 5 to 20.

  6. #6
    No Products Registered

    Join Date
    Jul 2014
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But what I need is "If alterable value A = 1" AND "Alterable value B = (any number between x and y)"

    Maybe if I explain what the hell I'm doing in full.

    I have two strings that together make a sentence. Depending on the strings the sentence either makes sense, or it doesn't.

    The first string has 5 different possibilities, governed by Value A(which goes from 1-5)

    Each of those 5 strings has 5 compatible possibilities in string 2. Governed by Value B(which goes from 1-25)

    So if A=1 then the compatible strings will be B=1-5
    A=2 compatible with B=6-10
    etc.

    The player will then click on a tick or an X to say if a sentence is correct or not.

    So I was looking for a quick way to compare A against a range of numbers in B.

    I ended up using >= and <= five times instead. Which works, I was just hoping there'd be an even easier way to do it.

Similar Threads

  1. Range of Random Numbers
    By Jaklar in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 8th November 2014, 05:20 PM
  2. using a range of numbers in expression editor
    By takki in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 8th May 2011, 11:10 PM
  3. comparing numbers
    By Zabooza in forum Multimedia Fusion 2 - Technical Support
    Replies: 21
    Last Post: 25th March 2009, 03:04 AM
  4. Select a range numbers from an alterable value?
    By Mantoid in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 14th March 2009, 09:49 AM

Tags for this Thread

Posting Permissions

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