Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • Strings & Characters Primer

Strings & Characters Primer

About Strings and Characters

A string is a sequence of characters. You are likely to see strings expressed in many different ways in Makecode projects, so this page shows many of the formats you are likely to encounter.

It also introduces how strings can contain data. Because of this, Makecode has many features for manipulating strings. Examples include indexing and built-in blocks.

With or Without a Variable

Strings do not necessarily have to be assigned to variables. For example, here is a string in a serial write block that uses a string as-is:

In many cases, it is better to name a string. If you use a long string more than once, naming it will save considerable code space. For example, instead of two serial write blocks, a string is named once and printed twice:

ASCII Codes

Inside the micro:bit, characters are actually stored as numbers. In the case of the character A, it’s number is 65. The number for the B character is 66. The numbers are called ASCII codes, and are actually the numbers your keyboard sends your computer when you type the A, B, and other keys. Making projects that manipulate ASCII codes is a first step toward encrypting messages for cybersecurity.

You can find the ASCII Table for codes 0 to 127 in the Reference section:

ASCII Table 0–127


Printer-friendly version

Leave a Comment Cancel reply

Strings for Exchanging Data
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn • Built with GeneratePress