मान (variables)

transliteration: māna, meaning: Value

Like in mathematics and programming languages, vedic also has variables that allow you to store values of any type under a variable name.

To create a variable, you can use the मान syntax. The keyword मान is followed by the variable name, and an equals sign (=), and then the value. To assign new value or update it value you need to follow the same steps.

Data Types

Vedic has three standard data types:

वाक्य (t. vAkyA, m. sentence)

वाक्य Data type are same as string of other Programming Lang.

In the following example, we set a variable named नाम (t: nāma, m: Name).

मान नाम = 'रामानुजन्';

You have to put the string inside single or double quotation marks ("string" or ‘string')

अंक (t. ank, m. number)

Vedic supports Devanagari numerals which are base 10 decimal based number system.

Sanskrit English Transliteration
0 śūnya (शून्य)
1 eka (एक)
2 dvi (द्वि)
3 tri (त्रि)
4 catur (चतुर्)
5 pañca (पञ्च)
6 ṣaṭ (षट्)
7 sapta (सप्त)
8 aṣṭa (अष्ट)
9 nava (नव)

In the following example, we set a variable named आयु (t: āyu, m: age).

मान आयु = ३२;

and to float are also same

मान पाई   = ३.१४१५९;

तर्क (t. tarka, m. logic)

This allows you to write raw सत्य ( true ) or असत्य ( false ) values:

मान क = सत्य;
मान ख = असत्य;