Giter Club home page Giter Club logo

brolang's Introduction

BroLang

Logo

Data Types

  1. num: A data type that stores all the integer and float point values

  2. String: A data type used to store text-based data, such as names, addresses, messages, and more. (basically int)

  3. boolean: There are two values of the Boolean data type: Cap and NoCap, which represent "false" and "true" statements, respectively.

Arithmetic Operations

  1. + : This represents addition operation (2+5=7)
  2. - : This represents subtraction operation (2-5=-3)
  3. * : This represents multiplication operation (2*5 = 10)
  4. / : This represents division operation (2/5 = 0.4)

Assignment Operator

  1. := (this represents the equal to operation (num i := 5))

String Operations

  1. watchaPackin: (returns the number of character in the string, i.e its length)
  2. [m:*] (returns the substring from index m to end)
  3. [m:n] (returns the substring from index m to index n - 1)
  4. [m] (returns the character at index m)
  5. (returns the index of string2 in string1)

Example

string name := "pritam"
string substr
substr := name[0:3]
goOffKing substr
num len
len := watchaPackin: substr
goOff "Length is: "
goOff len

Output: pri Length is: 3

Display Operations

  1. goOff (prints the string/ number / boolean to the console)
  2. goOffKing (prints the string/ number / boolean to the console along with a new line)
  3. getSauce (takes input from the user; there are three type specifiers: %n, %b, and %s for numbers, booleans, and strings respectively)

Example

Input: hey

goOff "Hello World!"
string name
getSauce %s name
goOff name

Output: Hello World! : Pritam Pritam

Iterative Statements

  1. loopin i : (initial,final) (for loop - intitial to final)
    A loop which executes the code, written in the block, (final-initial) times

Example:

num m := 0
num n := 3
loopin i : (m,n)
{
	goOff i
}
  1. tillClapback() (while) A loop which executes the code, written in the block, till the [condition] becomes Cap.

Example :

num i := 5
tillClapback(i > 0)
{
	goOff i
	i := i - 1
}
  1. vibeCheck() (If): executes the code if the [condition] is NoCap.

  2. bruhPlease() (else if ): the "else-if" equivalent

  3. okBoomer (else): the "else" equivalent

  4. peaceOut: End if statement Ends the if loop.

Example:

num i := 5
vibeCheck i == 1
{
	goOff i
}
bruhPlease i == 3
{
	goOff i 
}
okBoomer
{
	goOff i
}
peaceOut

brolang's People

Contributors

kayal314 avatar sukrit2005 avatar surajnav2210 avatar

Stargazers

Ryan Moothedan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.