HISE Logo Forum
    • Categories
    • Register
    • Login

    && operator is not working on range based loops

    Scheduled Pinned Locked Moved General Questions
    2 Posts 1 Posters 377 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • orangeO
      orange
      last edited by orange

      Hi
      && operator is not working on range based loops. For example, if we have 3 statements with 3 ranges inside the different 2 if statement:

      range 1: 0 to 2;
      range 2: 2 to 5;
      range 3: 5 to 10;
      .....

      this one doesn't work;

      NOTE: knob values are decimal numbers, not whole numbers.

      if (x1 == 0)
             {
      
                    if (knob <= 2)
                      {
                          
      	 
                      }
      
                     if (knob <= 5 && knob> 2)
                      {
                          
      	 
                      }
      
                    if (knob <= 10 && knob> 5)
                      {
                          
      	 
                      }
           }
      
      
      if (x1 == 1)
             {
      
                    if (knob <= 3)
                      {
                          
      	 
                      }
      
                     if (knob <= 6 && knob> 3)
                      {
                          
      	 
                      }
      
                    if (knob <= 11 && knob> 6)
                      {
                          
      	 
                      }
           }
      
      
      
      

      develop Branch / XCode 13.1
      macOS Monterey / M1 Max

      orangeO 1 Reply Last reply Reply Quote 0
      • orangeO
        orange @orange
        last edited by

        @orange Ok, I've solved it. It works like a charm :)

        develop Branch / XCode 13.1
        macOS Monterey / M1 Max

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        47

        Online

        1.7k

        Users

        11.7k

        Topics

        101.9k

        Posts