SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Comment formatting anomaly (read warning @bottom)!!!

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Comment formatting anomaly (read warning @bottom)!!!
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Comment formatting anomaly (read warning @bottom)!!! Reply with quote
I've run into a funny formatting anomaly. The code below
Code:

DECLARE   
   @var1      INT = 1
   ,@var2     INT = 2
   ,@var3     INT = 3
   ,@var4     INT = 4

SELECT
   ((@var1 - @var2) /* arbitrary comment here */ * @var3 - @var4)

is syntactically correct and nothing weird happens when I try to format it. This one on the other hand,
Code:

DECLARE   
   @var1      INT = 1
   ,@var2     INT = 2
   ,@var3     INT = 3
   ,@var4     INT = 4

SELECT
   ((@var1 - @var2) /* arbitrary comment here */* @var3 - @var4)  -- notice, there's no space between the multiplication and the comment closing slash

while still being syntactically correct (at least it'll compile in SSMS), will be ruined after formatting:
Code:

DECLARE   
   @var1      INT = 1
   ,@var2     INT = 2
   ,@var3     INT = 3
   ,@var4     INT = 4

SELECT
   (
      (@var1 - @var2) /* arbitrary comment here *//* @var3 - @var4)


EDIT:

!!! WARNING !!![u]

This structure (namely, "*/*") renders SA non-functional after its location. No popups, no autocomplete, no last char triggered snippets, nothing!!!

!!! WARNING !!!

Thu Jul 26, 2012 4:13 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Thank you very much for the bug report. I have logged 2 separate cases, 1 for for the formatting issue, and 1 for the parsing of /*...*/* code. Issue tracking numbers are #SA0019988 and #SA0019987
Thu Jul 26, 2012 9:17 am 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.