How can we help you today? How can we help you today?

Lay Out - a BEGIN / END suggestion

Sometimes it happens that we have a really large chunk of code inside a BEGIN / END construct. In such cases, it would be nice if we could get something like this:

IF (@... = @xyz)
BEGIN
..
..
some more code :)
..
..
IF (@... > 0)
BEGIN
..
..
..
END -- IF (@... > 0)
ELSE
BEGIN
..
..
..
END -- ELSE -> IF (@... > 0)
END -- IF (@... = @xyz)

Hope you see what I meant.. :)

BTW, why don't my tabs show up in the posts??

Dean Vitner
dvitner
0

Comments

1 comment

  • drsql
    You have to put stuff like this in brackets:
    IF (@qwe > 0) 
      BEGIN 
      .. 
      .. 
      .. 
      END -- IF (@qwe > 0) 
    ELSE 
      BEGIN
    

    I am assuming you mean the comments. I like ths comment idea. This would be especially useful for newsgroup posts from dyslexic programmers (which for me is a large value of this tool.) Too often code has twenty layers of code that is just impossible to read.
    drsql
    0

Add comment

Please sign in to leave a comment.