Multi-Line Blocks

Author: Philip Dorrell

Correspondence is a framework for interactively visualizing correspondences between items in related blocks.

Multi-Line Blocks, with Interleaving

This page contains an example of a translation where each block consists of multiple lines. It is an example of translating code in the Ruby programming language into English.

Check the "Interleaved" checkbox, to see the blocks interleaved with each other so that corresponding lines within the two blocks are immediately adjacent.

And uncheck to go back to the original un-interleaved view.

Ruby
x = 3
x = 4
x = x + 1
puts x
=> 5
English
Set the value of the variable x to be 3.
Set the value of the variable x to be 4 (over-writing the previous value of 3)
Set the new value of the variable x to be the current value of x plus 1 (so the new value of x will be 4 + 1 = 5)
Print out the value of the variable x (prints out 5)
Last updated: 9 October 2013