Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipX.Lib v1.2 - <b>cr()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Cr()
Returns/writes Carriage Return / Line Feed
---------------------------------------------------------------------

Syntax:

  Cr( [< nCount >] )  --->  cString

Arguments:

  [<nCount>] is an optional numeric value which indicates the number of
  CR/LF characters to generate. The default is one.

Returns:

  A character string consisting the generated Carriage Return / Line Feed
  characters.

Description:

  Generates from one to [<nCount>] Carriage Return / Line Feed
  ( Chr(13)+Chr(10) ) characters. One CR/LF is generated by default.

  The output of this function should not be confused with the Br() function
  ( HTML <BR> tag ). The Br() function is used to seperate lines as they
  are displayed by the browser. A review of the HTML source ( from the
  browsers View|Source option ) may show several long unbroken and hard to
  read lines. The Cr() function can be used to break these long lines
  into something more easily read.

  For example:

    The following code

      htmlBeg()
      HeadBeg()
      TitleBeg()
      htmlWrite( "My Test" )
      TitleEnd()
      HeadEnd()
      BodyBeg()
      Br()
      htmlWrite( "Hello" )
      Br()
      htmlWrite( "World" )
      BodyEnd()
      htmlEnd()

    will display on the browser as

      Hello
      World

    but the HTML code will look like this

      <HTML><HEAD><TITLE>My Test</TITLE></HEAD><BODY><BR>Hello<BR>World</BODY></HTML>

    the generated HTML code can be more readable

     <html><head>
     <title>My Test</title>
     </head><body><br>

     Hello
     <br>
     World

     </body></html>

    by placing the Cr() functions as follows

      htmlBeg()
      HeadBeg()               ; Cr()
      TitleBeg()
      htmlWrite( "My Test" )
      TitleEnd()              ; Cr()
      HeadEnd()
      BodyBeg()
      Br()                    ; Cr() ; Cr()
      htmlWrite( "Hello" )    ; Cr()
      Br()                    ; Cr()
      htmlWrite( "World" )    ; Cr() ; Cr()
      BodyEnd()
      htmlEnd()

  The generated string is always returned. The string will be written
  to standard-out depending on the value of StopWrite().
  The default StopWrite() value is FALSE. Setting the StopWrite() value
  to TRUE will suspend the write to standard-out.

Examples:

  ...
  ...
  BoldBeg() ; Cr()
  htmlWrite( 'The Cr() will not make the HTML page look different,' )
  Cr()
  Br()
  htmlWrite( ' but will make the HTML more easily read.' ) ; Cr()
  BoldEnd()  ; Cr()
  ...
  ...

Alternate:

  htmlWrite( Chr(13) + Chr(10) )

Files: Library is ClipX.Lib

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson