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

Console

In order to perform faster and efficient print operation, SRON provides 'Console' attribute.

Syntax:

    console : (value1 , value2)

Note: 'Console' requires only value type tokens.

Examples:

Correct Syntax:
    console : (val1 , val2 , val3)
or
    console : (val1 , get_val(), "SRON", true, 1234.553)

------------ 

Wrong Syntax:
    @ you need to insert all variables 
    @ within round-brackets
    console : val1 , val2
or
    @ expects tokens which gives some value
    console : (val1, continue , break)

Sample code to print values using 'console' attribute

{
    name : Main
    Int val1 = 2706
    Int val2 = 2003

    console : (val1, val2)
    console : ("Saksham")
}

OUTPUT:

27062003"Saksham"


Note:

  • Unlike println() function, it does not add a new line after printing values.

  • Also, it prints 'String' type values with double quotes (").

PreviousRotateNextSample codes

Last updated 6 months ago