Results 1 to 7 of 7

Thread: vbNewLine

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    vbNewLine

    This constant has me puzzled. The definition in the Object Browser is
    Constant for NewLine; platform specific
    which begs the question - What does 'platform' mean in this context?
    (I'm not aware that VB code will run on Operating System 'platforms' other than the Windows family, except for, I guess, Windows emulators)

    Even so, I can't see its value. If I create a file on Platform "X" where vbNewLine is defined as a Carriage Return and then try to read the file on Platform "Y" where vbNewLine is defined by a Carriage Return Line Feed pair I will have trouble (eg if I Split on vbNewLine I'll end up with one Array element) Porting a file from "Y" to "X" (and splitting on vbNewLine) would give extraneous LFs in the Array elements. That sorts out the 'specific' part of the definition.

    Now, Microsoft wouldn't have gone to the bother if creating it if it wasn't useful(?)

    Can anyone give me an example of the conditions where it's use would be more appropriate than the 'standard' CRLF pair? - I can't think of one. (perhaps I've just led a sheltered (programming) life )
    Last edited by Doogle; Jan 7th, 2012 at 03:33 AM.

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