Docs Installation Playground Explore AST

Set on System Basis

Variables and Data Types

BroCode uses familiar terms to declare and manage variables and data types. Here’s how to work with strings, numbers, booleans, and expressions in BroCode.


Variables: "Bro, Hold My Value! 💼"

Variables in BroCode are like your gym bag – they hold all your stuff till you need it. Just say, "bro maanle," and stash your gains! 🏋️

BROCODE
bro maanle weightGain hai '12kg';

Pro Tip: Always name your variables something meaningful, like 'gains,' not 'thingy123'!

Bro, Let’s see what you can hide in your bag. 🎒

1Strings: "Bro, It’s All in the Words! 📝"

Strings in BroCode are like those epic quotes or your favorite pickup lines – just wrap them in quotes and let the magic happen! ✨

BROCODE
bro maanle greeting hai "Hey bro, how’s it going?";

Pro Tip: Use strings for messages, labels, or whenever you want your code to speak up like a chatty bro!

2Numbers: "Bro, Count Your Gains! 🔢"

Numbers in BroCode are like the weights you lift – they help you track progress. Whether it’s counting reps or gains, numbers got your back! 💪

BROCODE
bro maanle benchPressWeight hai 120;

Context: Use numbers for calculations, tracking, and proving you’re the strongest bro in the room!

3Boolean: "Bro, True or False? 🤔"

In BroCode, booleans are your 'yes or no' bros. They’re perfect for deciding if something’s legit or not. 🧐

BROCODE
bro maanle isWorkoutDay hai sahi;

Pro Tip: Use booleans for conditions, toggles, or to decide if it’s cheat day. (Hint: It’s always cheat day. 🍕)

4Null: "Bro, It’s Empty! 🕳️"

Null in BroCode is for when there’s nothing to see here, bro. It’s the placeholder for “we’ll figure it out later.” 🤷

BROCODE
bro maanle nextWorkout hai faltu;

Context: Use null for placeholders or when something’s intentionally left blank. (Like your bro's excuses!)

5Expressions: "Bro, Do Some Math! 🧮"

Math in BroCode is a breeze! Just use your operators and get the answers faster than your calculator bro. 💨

BROCODE
bro maanle totalGains hai 12 + 8;

Context: Use this for calculations like splitting bills, gym sets, or even doing maths (coz bro i hate Math 🤢)

BroCode © 2024. All rights reserved.