Lipi

Data Types

Lipi supports several primitive data types for storing different kinds of values.

Basic Data Types

Lipi provides the following basic data types:

  • purna: Integer (whole numbers)
  • dasa: Decimal (floating-point numbers)
  • akshar: Character (single character)
  • paath: String (text)
  • khali: Void (only for functions)
purna count;    :) Integer
dasa price;     :) Decimal
akshar grade;   :) Character
paath name;     :) String
khali nothing;  :) Invalid, khali is only for functions

Examples

Here are examples of declaring and using variables of different data types:

purna age;       :) Declare an integer variable
age = 25;       :) Assign an integer value

dasa pi;        :) Declare a decimal variable
pi = 3.14159;   :) Assign a decimal value

akshar grade;   :) Declare a character variable
grade = 'A';    :) Assign a character value

paath name;     :) Declare a string variable
name = "John";  :) Assign a string value

Boolean Values

Lipi uses thik and bethik as boolean values for true and false, respectively. These are typically used in conditional expressions.

Next Steps

Now that you understand data types in Lipi, you can learn more about: