Emojicode - Code with emojis π (Introduction)
LeafKn
Posted on March 7, 2022
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.
- You can run your Emojicode programs locally by following the steps of installation on their main website: Install Locally
- 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
So, basic emojicode file will look like this:
π π
code here..
π
Print stuff:
To print in Emojicode, we use the π βοΈ
π code to print.. βοΈ
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:
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:
- Single-line --> comment out a single line and starts with a π in emojicode.
- 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 ππ
π
TIP: Press
Win + .
key combination on windows orControl + Command + Spacebar
on mac to bring the emoji keyboard.
Thank You! Stay Tuned for other parts :)
Posted on March 7, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.