Variables in SRON
To declare a variable, you have to specify the type of variable
first, then the variable name followed by value.
- Syntax
datatype variable = value
or
datatype variable Any x = [1,2,3,4,5]{
name : Main
Int a= 10, Any b= [1,2,3,4,5]
Double x= 12.345, Char y= 'S'
@ declaring a multiline string...
String multi_str = "Hello, this is
Saksham Rapid Object Notation."
@ it is not neccessary to assign a value
Int X, Double Y, List lst
}Variable Naming Rules
Before naming a variable or even a function, you should follow some rules:
Last updated