Emojicode Data Types

Anonymous contributor's avatar
Anonymous contributor
Published Jul 23, 2021Updated Oct 19, 2021
Contribute to Docs

All programming languages designate certain ā€œtypesā€ of data. This helps the operating system and computer hardware allocate memory based on the type of data that is going to be stored.

Emojicode, being a very type-safe language, takes great care to ensure that data types are understood, by both you and the compiler.

Here are a few basic data types in Emojicode:

Type Description
šŸ”¢ Integer numbers
šŸ’Æ Decimal numbers
šŸ”” Text strings
šŸ‘Œ Truth values šŸ‘/šŸ‘Ž
  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours
  • šŸ‡ Learn about Emojicode, a programming language that consists of emojis! šŸ‰
    • Beginner Friendly.
      1 hour

šŸ”² Type Casting

Type casting is a way to determine whether a value is of a given type at run-time and to treat the value as an instance of this type.

šŸ”² value type

The value is the value to be casted to type:

  • If value can be casted to type, then value is returned as type.
  • If it can’t, then no value is returned.

Type casting is implemented with the šŸ”² statement:

šŸ”² hello šŸ”” šŸ’­ Tries to cast txt to šŸ””
šŸ”² world 🐟 šŸ’­ Tries to cast a to 🐟

All contributors

Contribute to Docs

Learn Emojicode on Codecademy

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours
  • šŸ‡ Learn about Emojicode, a programming language that consists of emojis! šŸ‰
    • Beginner Friendly.
      1 hour