Documentation topicsIdentifiers
Lexical Structure
Control Flow
Functions & Scope
Lists & Built-ins
Reference
MarathiCode v0.2.0
Identifiers
चल व कार्यांची नावे
Identifiers name variables, functions and parameters.
- The first character is a Devanagari character (U+0900 to U+097F), an ASCII letter or
_. - Later characters can also be digits, ASCII (
0-9) or Devanagari (०-९). - An identifier cannot be one of the 17 keywords.
- ASCII letters are case-sensitive:
totalandTotalare different names.
| Name | Valid? |
|---|---|
| वय | Yes |
| एकूण_गुण | Yes |
| total_गुण | Yes (mixed scripts) |
| बेरीज1, बेरीज१ | Yes |
| _संख्या | Yes |
| 1बेरीज | No: starts with a digit |
| जर | No: keyword |
identifiers.mr
चल विद्यार्थ्याचे_नाव = "सई"
चल गुण१ = 90
चल total_गुण = गुण१ + 5
छापा(विद्यार्थ्याचे_नाव + ": " + total_गुण)Output (आउटपुट)
सई: 95
Using a keyword as a name is a syntax error:
keyword_name.mr
चल जर = 10Output / Error (आउटपुट / त्रुटी)
वाक्यरचना त्रुटी (Syntax Error)
ओळ 1:
चल जर = 10
^
अपेक्षित अभिव्यक्ती किंवा अयोग्य विधान: 'जर'