MarathiCodev1.0
by Sprout Tech

Variables & Assignment (चल)

चल <नाव> = <अभिव्यक्ती>

Variables store values in memory. In MarathiCode, variables are declared using the keyword चल (meaning variable).

Syntax & Declaration

variables.mr
// Numbers
चल वय = २५
चल गुण = 85.5

// Strings
चल नाव = "राम"

// Booleans
चल पास = खरे
चल नापास = खोटे

छापा(वय)
छापा(नाव)

Variable Re-assignment & Expressions

Variable values can be updated or computed dynamically using expressions:

reassignment.mr
चल संख्या = १०
चल संख्या = संख्या + ५
छापा(संख्या) // Prints 15

Rules for Variable Names

RuleExampleStatus
Devanagari identifierचल वय = २०Valid
ASCII identifierचल age = 20Valid
Mixed Marathi + ASCIIचल total_गुण = 100Valid
Reserved keyword nameचल जर = १०Invalid Error