Built-In Functions

Learn how to use built-in functions provided by BornomalaScript.

Built-In Functions

Built-in functions are functions that already exist in the language.

You do not need to write them yourself because BornomalaScript provides them for common tasks.

Why Built-In Functions Matter

Built-in functions save time because they give you ready-made tools for everyday work.

Examples include:

  • printing text
  • reading input
  • working with collections
  • handling common operations

Basic Example

Here are two built-in functions you will use often:

lekho("Hello")
inputNao("Promt: ")

These examples show two common built-in actions:

  • lekho prints output
  • inputNao reads input

How It Works

You call a built-in function by writing its name and passing any needed values inside parentheses.

That means the language already knows what to do, and you only need to supply the inputs.

Important Note

You should not create your own function with the same name as an existing built-in function.

That can cause confusion and make your code harder to understand.

Step-by-Step Breakdown

  1. Choose the built-in function you need
  2. Pass the required value or text
  3. Let the language handle the internal work
  4. Read the output or result

Try These Variations

Try using the built-in functions in small programs:

lekho("Shagotom BornomalaScript")
dhoro nam = inputNao("Tomar nam ki?: ")
lekho("Shagotom, " + nam)
dhoro value = inputNao("Ekta value dao: ")
lekho(value)

Common Mistakes

Beginners often make these mistakes:

  • forgetting the parentheses
  • passing the wrong kind of value
  • thinking built-in functions need to be rewritten
  • creating another function with the same name

Practice Task

Try writing a small program that uses a built-in function to:

  1. print a greeting
  2. ask for a name
  3. echo the name back to the screen

Quick Checklist

Before moving on, make sure you can:

  • identify a built-in function
  • call it with the correct syntax
  • avoid naming conflicts with built-ins

If yes, you are ready to write custom functions.