Tell me what expression to compare numbers with the function "Compare 2 numbers"

0 favourites
  • 5 posts
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • Hello to all.

    I need to compare the "First Number" is it among the series of numbers

    For example:

    If 5 equals

    and here I ask the ruler of the number: 1,2,3,4,5,6,7,9 - How is the problem that the system would compare the first number with a number of numbers?

    Is there a comparison number among these numbers?

  • There is no such condition or expression.

    If the series of numbers is always the same, you can do this:

    Compare two values (a=1 | a=2 | a=5 | a=10 | ...) = 1
    

    Or you can put all numbers in a text variable numbersList=",1,2,5,10," and search this string:

    Compare two values find(numbersList, "," & str(a) & ",") >=0
    

    Or put all numbers into an array and loop through the array comparing each index.

    Если что-то непонятно, могу на русском объяснить.

  • There is no such condition or expression.

    If the series of numbers is always the same, you can do this:

    > Compare two values (a=1 | a=2 | a=5 | a=10 | ...) = 1
    

    Or you can put all numbers in a text variable numbersList=",1,2,5,10," and search this string:

    > Compare two values find(numbersList, "," & str(a) & ",") >=0
    

    Or put all numbers into an array and loop through the array comparing each index.

    Если что-то непонятно, могу на русском объяснить.

    -----

    Да, если можно, что то не совсем понял. Где вы это прописали и как.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • See this demo:

    https://www.dropbox.com/s/87bpiif8ggzq6eg/NumbersList.capx?dl=0

    Большое спасибо!))))))) то что я как раз хотел сделать)

    Тут уже нужно знание видно программирования(

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)