Emojicode - Code with emojis 😎 (Introduction)

knaagar

LeafKn

Posted on March 7, 2022

Emojicode - Code with emojis 😎 (Introduction)

Let's make our code beautiful and attractive...
Let's code with emojis!

In this article I'll cover Introduction to Emojicode -> 1st article/blog of 3 part series.

What is this - programming in emojis πŸ˜•?

Yeahhh.. programming with emojis.
Emojicode is an open-source, strongly-typed programming language consisting of emojis created by Theo Weidmann.

Let's begin! 🀩

So before getting to the basics of programming, let me tell you where you can code this language.

  1. You can run your Emojicode programs locally by following the steps of installation on their main website: Install Locally
  2. You can start right away using the online editor of TIO: Online TIO Editor

Extension:

We write Emojicode programs in files with the extension .emojic or .πŸ‡

Basic Structure:

All code will be inside 🏁 block. The 🏁 block indicates all the code that should run when the file is executed.
For larger programs, we use πŸ‡ and πŸ‰ to add more blocks.

πŸ‡ --> the start of the code block
πŸ‰ --> the end of the code block
Enter fullscreen mode Exit fullscreen mode

So, basic emojicode file will look like this:

🏁 πŸ‡
  code here..
πŸ‰
Enter fullscreen mode Exit fullscreen mode

Print stuff:

To print in Emojicode, we use the πŸ˜€ ❗️

πŸ˜€ code to print.. ❗️
Enter fullscreen mode Exit fullscreen mode

Strings:

If you have ever worked with a programming language then you must have worked with strings. But for newbies - Strings are a form of data type for computer. Strings are pieces of text.

Strings in Emojicode has to be wrapped around πŸ”€
Here's an example of printing a string in emojicode:
example

Comments

Comments are lines of code that you don't want to execute. Comments can explain what the code is doing or leave instructions.
There are two types of comments:

  1. Single-line --> comment out a single line and starts with a πŸ’­ in emojicode.
  2. Multi-line --> comment out multiple lines and starts with πŸ’­πŸ”œ and ends with πŸ”šπŸ’­ in emojicode.
🏁 πŸ‡
πŸ’­ single-line comment
πŸ’­ printing a string
  πŸ˜€ πŸ”€Practicing commentsπŸ”€β—οΈ
  πŸ’­πŸ”œ Multi-line comment πŸ”šπŸ’­
πŸ‰
Enter fullscreen mode Exit fullscreen mode

TIP: Press Win + . key combination on windows or Control + Command + Spacebar on mac to bring the emoji keyboard.

emoji keyboard

Thank You! Stay Tuned for other parts :)

πŸ’– πŸ’ͺ πŸ™… 🚩
knaagar
LeafKn

Posted on March 7, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related