Documentations - SRON
  • SRON's Official Documentation
  • Installation
  • Syntax of SRON
  • Executing a SRON code
  • Keywords in SRON
  • Comments in SRON
  • Datatypes in SRON
  • Variables in SRON
  • Memory Ownership Model
  • Operators in SRON
  • Math block
  • if elif else in SRON
  • Loops in SRON
    • For Loop
    • While Loop
    • Foreach Loop
  • Break & Continue
  • Functions in SRON
    • Print functions
    • User Input Functions
    • Type Conversion functions
    • Type Checking functions
    • Math functions
    • Char Functions
    • String Functions
    • List Functions
    • Miscellaneous functions
  • Return in SRON
  • Command Line Arguments
  • Free
  • Rotate
  • Console
  • Sample codes
  • Coding Convention
  • Frequently Asked Questions
  • Credits
  • Contact
  • Donate
Powered by GitBook
On this page

Comments in SRON

Comments are lines which are used in code to provide explanations, or notes that are ignored by the compiler. It is removed by the compiler at compile time.

Comments are very helpful during the maintenance of big projects. They help humans understand the data structure and context but have no effect on the output of code.

SRON provides two types of comments:

  • Multi-line comments

  • Single-line comments

This is a multi-line comment because it is outside the scope of function.

{
    name : MAIN

    @ this is a single line comment declared using '@'
}

SRON's compiler starts the compilation from the first occurrence of open curly braces ( { ), so while using multi-line comments keep this point in your mind.

Single line comments are made using '@'.

But if you still want to make a comment starting with '{' , then you have to use '@' like this


This is a comment

@ {
   name : main
   println()
}

The above function will not be compiled by compiler because 
there is a open curly brace but after '@', whenever compiler 
reads '@' that whole line will be ignored by the compiler.

{
    name : main
    println("This function is compiled")
}

NOTE : YOU CANNOT MAKE MULTILINE COMMENT INSIDE THE FUNCTION.


PreviousKeywords in SRONNextDatatypes in SRON

Last updated 6 months ago