Table Of Contents
  • Values and Expressions
  • Data Types
  • Numbers
  • Read-Eval-Print Loop

Values and Expressions

In programming, the word expression is used to refer to something that can be evaluated and has value. The expressions in Scheme boast legitimate values unlike in Pascal, Java, C++, etc. These values can be held in variables and passed as parameters. In other words, we can say that every Scheme programming expression is a value but not all values are Scheme programming expressions. Values used in Scheme can take a variety of forms including numbers, symbols, strings, etc.

Data Types

Scheme programming language does not have a variable declaration like in most languages. This is because any type of value can be held by any variable. In Scheme, it is only the values that have a type, but not the variables. To be more explicit, it is the value of the variable that determines what can be accomplished with a particular variable and not the fixed type of the variable. This is one of the advantages of the Scheme language. It saves the programmer the time of writing declaration statements.


Most programming languages have integers and floating-point (reals) as a type of number. In these languages, programmers are required to check the closeness of real numbers and not compare them for equality. However, things are quite different in Scheme. Programmers working with numbers in Scheme tries to closely approximate the mathematician's notion of the number. For example, the ratio ΒΌ will be stored as a ratio of two integers.

Read-Eval-Print Loop

Starting an interactive system in Scheme prompts the read-eval-print loop. This indicates that the Scheme system is waiting for you to input your expression so it can try and read it. Once you're the expression has successfully been read, it is evaluated and then the result is printed. This system works the same as a calculator. Note that Scheme evaluates each expression differently. Also, the value result printed can be any of the types we discussed above.