म
MarathiCodeby Sprout Tech
Documentation topicsIdentifiers
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: total and Total are different names.
NameValid?
वय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
चल जर = 10
Output / Error (आउटपुट / त्रुटी)
वाक्यरचना त्रुटी (Syntax Error)
ओळ 1:
    चल जर = 10
       ^
अपेक्षित अभिव्यक्ती किंवा अयोग्य विधान: 'जर'