 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
Comment formatting anomaly (read warning @bottom)!!! |
|
I've run into a funny formatting anomaly. The code below
 |
 |
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,
 |
 |
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:
 |
 |
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 |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
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 |
|
 |
|
|
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
|
|
|