Syntax For Writing Your Program Code On This Forum

Home Forums General Announcements Syntax For Writing Your Program Code On This Forum

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1033
    Satish
    Keymaster

    This is the basic syntax to show/display your code (not to execute) on the forum:

    Syntax: (Most Important)

    <pre name="code" class="cpp">
    //your program code goes here. Make sure to provide proper formatting. Do not write everything in one line.
    // Break it more often than not. Break it to new line, so that it doesn't go out of boundary of this forum
    //when you submit/publish it.
    </pre>

    Make sure to replace < with &lt; and > with &gt; wherever it appears in your program code.
    Ex: While writing header files in C.

    name required Name of <pre> and <textarea> elements to use.
    showGutter optional Turns gutter on or off on all processed code blocks.
    showControls optional Turns controls on or off on all processed <pre>.
    collapseAll optional Turns collapse on or off on all processed <pre>.

    If showControls is false or switched, this value will be ignored.
    firstLine optional Allows to specify the first line where line numbering starts.
    This is usefull if you want to illustrate where the code block
    is located relative to the file.
    showColumns optional Will show row columns in the first line.

    In the place of class=”cpp” as shown in above syntax, you can write any of the below programming language name. This would help it to highlight or differentiate the coding elements.

    Languages Supported

    Language Aliases
    C++ cpp, c, c++
    C# c#, c-sharp, csharp
    CSS css
    Delphi delphi, pascal
    Java java
    Java Script js, jscript, javascript
    PHP php
    Python py, python
    Ruby rb, ruby, rails, ror
    Sql sql
    VB vb, vb.net
    XML/HTML xml, html, xhtml, xslt

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.