Expression
To print an expression, use the following format:
ကို အဖြေထုတ်ပါ။
Example:
( "Hello, World!" ) ကို အဖြေထုတ်ပါ။
Data Types
Thida Lang supports the following data types:
စာသား: asd
ကိန်းပြည့်: 5
ဒဿမ: 3.12
Boolean: ဖြစ်သည် ၊ မဖြစ်ပါ။
Variables
To assign variables, use the following syntax:
ဟု ယူဆပါ။
Example:
( a = 10 ၊ b = 20 ) ဟု ယူဆပါ။
Operators
Thida Lang supports basic arithmetic and comparison operators:
Addition:
a နဲ့ b ကို ပေါင်းပါ။ ( a , b ) သည် variables နှစ်ခု ဖြစ်သည်။
Subtraction:
a ထဲက b ကို နှုတ်ပါ။ ( a , b ) သည် variables နှစ်ခု ဖြစ်သည်။
Multiplication:
a နဲ့ b ကို မြှောက်ပါ။ ( a , b ) သည် variables နှစ်ခု ဖြစ်သည်။
Division:
a ကို b ဖြင့်စားပါ။ ( a , b ) သည် variables နှစ်ခု ဖြစ်သည်။
Comparison operators:
Greater than:
a သည် b ထက် ကြီးသည်။
Less than:
a သည် b ထက် ငယ်သည်။
Equal to:
a သည် b နဲ့ တူသည်။
Control Flow
If Else
To use conditional statements:
သည် ဖြစ်လျှင် () ကို အဖြေထုတ်ပါ။ မဖြစ်ပါက ( ) ကို အဖြေထုတ်ပါ။
Example:
( a > b ) သည် ( "a is greater" ) ဖြစ်လျှင် ( "a is greater" ) ကို အဖြေထုတ်ပါ။ မဖြစ်ပါက ( "b is greater" ) ကို အဖြေထုတ်ပါ။
For Loop
To use a for loop:
( variable = start_value ; variable < end_value ; variable = variable + increment ) ( loop_body ) ကို လုပ်ဆောင်ပါ။
Example:
( i = 0 ; i < 10 ; i = i + 1 ) ( "Loop iteration " , i ) ကို လုပ်ဆောင်ပါ။
While Loop
To use a while loop:
( condition ) ဖြစ်နေသမျှ ( loop_body ) ကို လုပ်ဆောင်ပါ။
Example:
( a < 10 ) ဖြစ်နေသမျှ ( a ကို အဖြေထုတ်ပါ။ a = a + 1 ) ကို လုပ်ဆောင်ပါ။
Function
To define a function:
( function_name ) ခြင်းကို လုပ်ဆောင်ပါ။
Example:
( print_hello ) ခြင်းကို လုပ်ဆောင်ပါ။
Function definition and usage can be elaborated based on your specific needs and implementation.
Last updated