SQL Prompt 7.5.0.912 - IF ELSE formatting not working as advertised

After upgrading to version 7.5.0.912, and typing the following into a query window:

IF 1 =1 PRINT 'HELLO' ELSE IF 2=1 PRINT 'Good Bye'

This is what I got after doing the Format:

IF 1 = 1
PRINT 'HELLO';
ELSE
IF 2 = 1
PRINT 'Good Bye';

I was expecting the ELSE IF to be on the same line. I did a reset to the default formatting style.
Is the new feature not working or did I miss something?

Comments

  • Harry FrankishHarry Frankish Posts: 53 New member
    edited April 7, 2017 10:13AM
    HI pmagid

    Are you using the new formatting styles? You can turn these on by selecting "SQL Prompt > Options... > Labs > Experimental Features > Use new formatting styles"

    The default style there formats your example with ELSE IF on the same line:
    IF 1 = 1
        PRINT 'HELLO';
    ELSE IF 2 = 1
        PRINT 'Good Bye';
    

    Cheers
    Harry
Sign In or Register to comment.