Results 1 to 7 of 7

Thread: Issue with posting code using [CODE] tags

  1. #1

    Thread Starter
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Issue with posting code using [CODE] tags

    I just noticed that empty lines are being eliminated which causes code to loose its readability.
    As it appears to me if any "empty" line has any number of spaces or tab character then it will be deleted; if there are no additional chars then empty line remains.

    Example:
    Code:
    'wrong:
    Private Sub Command1_Click()
        Dim number As Long
        Dim result As Long
        
        number = 1999
        result = CLng(VBA.Left$(CStr(number), Len(CStr(number)) - 2) & "00")
        
        Debug.Print result
        
    End Sub
    
    
    'expected:
    Private Sub Command1_Click()
        Dim number As Long
        Dim result As Long
    
        number = 1999
        result = CLng(VBA.Left$(CStr(number), Len(CStr(number)) - 2) & "00")
    
        Debug.Print result
    
    End Sub
    The question is when did this get broken? It was always working fine.
    So, basically we loose original formatting.

  2. #2
    ex-Administrator brad jones's Avatar
    Join Date
    Nov 2002
    Location
    Indianapolis
    Posts
    6,608

    Re: Issue with posting code using [CODE] tags

    Can you post a screen shot of what you are seeing? The above code looks the same to me in both the wrong and expected sections. Empty lines are there.....

    Thanks,
    Brad!
    Have you given out your reputation points today? Select the Rate This Post link to give points for good posts!
    -------------------------------------------------------------
    Brad! Jones
    Lots of Software, LLC
    (I wrote: C Programming in One Hour a Day) (Dad Jokes Book) (Follow me on Twitter)

    --------------------------------------------------------------

  3. #3

  4. #4

    Thread Starter
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Issue with posting code using [CODE] tags

    Does anyone have any clue?

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Issue with posting code using [CODE] tags

    Interesting. Looks fine in both Firefox and IE 11 on Windows 8.1 too. Is there any visible difference in the source for the page in your two browsers?

  6. #6
    ex-Administrator brad jones's Avatar
    Join Date
    Nov 2002
    Location
    Indianapolis
    Posts
    6,608

    Re: Issue with posting code using [CODE] tags

    I just loaded this in Chrome 32 and the spacing looks fine. Do you have an add-in or something else that is using a style sheet that is overwriting defaults?
    Have you given out your reputation points today? Select the Rate This Post link to give points for good posts!
    -------------------------------------------------------------
    Brad! Jones
    Lots of Software, LLC
    (I wrote: C Programming in One Hour a Day) (Dad Jokes Book) (Follow me on Twitter)

    --------------------------------------------------------------

  7. #7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width