the difference between write and writeln

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jason Cook

    the difference between write and writeln

    What is the difference?
  • Christophe Vanfleteren

    #2
    Re: the difference between write and writeln

    Jason Cook wrote:
    [color=blue]
    > What is the difference?[/color]

    Please put your question in the body, and not in the subject.

    One just writes to the outputstream, the other writes a line (meaning that
    the next write/writeln call will be written on a new line).

    --
    Regards,
    Christophe Vanfleteren

    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: the difference between write and writeln

      Jason Cook wrote:
      [color=blue]
      > What is the difference?[/color]

      writeln = "write line"

      Some JavaScript engines append newline when using writeln(...),
      but not when using write(...). I recommend to use write("...\n")
      if newline is required.


      PointedEars

      Comment

      • alu

        #4
        Re: the difference between write and writeln


        "Jason Cook" <jacook03194@ho tmail.com> wrote in message
        news:d8c76161.0 310210714.3a229 aff@posting.goo gle.com...[color=blue]
        > What is the difference?[/color]

        The write method is the same as the writeln method, except the write method
        does not append a newline character to the end of the output.




        Comment

        Working...