This project is read-only.

Visibility scopes

In Mirelle, variable scopes are defined by the following constructions:

A local variable will be visible from the point of it's definition till the end of the block it has been defined in. All nested blocks can also access the variable.

var a = 10
if a > 5 do
  var b = 5
  if b > 1 do
    print b
  // the following statement is erroneous,
  // because the 'b' variable is not visible
  print b

Last edited Mar 17, 2011 at 10:19 AM by impworks, version 2


No comments yet.