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 15Rules for Variable Names
| Rule | Example | Status |
|---|---|---|
| Devanagari identifier | चल वय = २० | Valid |
| ASCII identifier | चल age = 20 | Valid |
| Mixed Marathi + ASCII | चल total_गुण = 100 | Valid |
| Reserved keyword name | चल जर = १० | Invalid Error |