Wish Build configurations 3 or 5 lines into 1 (Condition)

Discussion in 'Bugs & wishlist' started by Peter Simpson, Oct 11, 2018 at 1:27 PM.

  1. Peter Simpson

    Peter Simpson Expert Licensed User

    Hello,
    I know it's not really a big issue, but when using Build Configurations B4X developers do the following.
    Code:
    Example using 3 lines:
            
    #If Developer
                Log($"3 lines into 1 = "${MakeItSo}$)
            Else
                Log($"5 lines into 1 = "${MakeItSo}$)        
            
    #End If
    It would be nice if we could just have the above work with one line just like the normal If > Then > Else condition.
    Code:
    Like this example using 1 line:
            
    #If Developer Then Log($"3 lines into 1 = "${MakeItSo}$) Else Log($"5 lines into 1 = "${MakeItSo}$)
    Just like the standard conditions in the B4X suite of tools.

    Thank you...
     
    Last edited: Oct 12, 2018 at 9:58 AM
    Filippo, Johan Hormaza and mindful like this.
  2. Filippo

    Filippo Expert Licensed User

    very helpful :)
    By the way, I did not know "if developer" until now. :(
     
    Peter Simpson likes this.
  3. Peter Simpson

    Peter Simpson Expert Licensed User

    If setup 2 conditions, Developer and Release, I use developer to view logs, to bypass the licensing library, to ignore warnings like file not used etc.

    But I wish it was more like the standard if else, that way we can either use 3 into 1 line or better still 5 into 1 line of code.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    While the syntax is indeed nice it is more complicated to implement then it might seem. The parser must build the document structure in a very efficient way. Many optimizations can be done based on the assumptions that subs and conditional symbols start on a new line.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice