SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Formatting issue with IF and PRINT

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Formatting issue with IF and PRINT
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2165

Post Formatting issue with IF and PRINT Reply with quote
What rule do I have to create or what rule order do I have to define to get the IF and PRINT formatted as following?
Code:

IF @debug = 1 PRINT 'good'

instead of
Code:

IF @debug = 1
    PRINT 'notgood'


Having a rule
Code:

IF @debug = 1 PRINT ...

simply does not work.
Thu Sep 03, 2015 2:43 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
You can define IF ... PRINT ... and move it above the predefined IF rule which causes causes the text wrapping. But if you format your code with IFs and following PRINT some lines below, it may mess up your code completely

I'd recommend cloning default formatting style to a new style with a subset of rules and replacement of default IF ... with IF ... PRINT ... and using that new style only in specific cases of IF @debug = 1 and similar.
Thu Sep 03, 2015 9:29 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2165

Post Reply with quote
Yes, I thought it would break some stuff. I would not rely on it if I were able to make this here working.

By the way, what's the difference between ... and <stmtList>?
Thu Sep 03, 2015 1:41 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.