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 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
value is the value to be casted to
valuecan be casted to
valueis returned as
- If it can’t, then no value is returned.
Type casting is implemented with the
🔲 hello 🔡 💭 Tries to cast txt to 🔡🔲 world 🐟 💭 Tries to cast a to 🐟
Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.
Learn Emojicode on Codecademy
Computer ScienceLooking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
Includes 6 Courses
With Professional Certification