What is lexical scoping (static scoping)? - Definition from WhatIs.com

Definition

lexical scoping (static scoping)

Part of the Programming glossary:

Lexical scoping (sometimes known as static scoping ) is a convention used with many programming languages that sets the scope (range of functionality) of a variable so that it may only be called (referenced) from within the block of code in which it is defined. The scope is determined when the code is compiled. A variable declared in this fashion is sometimes called a private variable.

The opposite approach is known as dynamic scoping . Dynamic scoping creates variables that can be called from outside the block of code in which they are defined. A variable declared in this fashion is sometimes called a public variable.

This was last updated in March 2011
Posted by: Margaret Rouse

Related Terms

Definitions

  • register (processor register, CPU register)

    - A processor register is one of a small set of data holding places that are part of a processor, or CPU, in a computer. (WhatIs.com)

  • compiler

    - A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or "code" that a computer's processor uses. (WhatIs.com)

  • agile test automation pyramid

    - The agile test automation pyramid is a graphical strategy guide for implementing automated software testing. The model splits types of testing into three layers based on the return on investment (R... (searchITOperations.com)

Glossaries

  • Programming

    - Terms related to software programming, including definitions about programming languages and words and phrases about software design, coding, testing and debugging.

  • Internet applications

    - This WhatIs.com glossary contains terms related to Internet applications, including definitions about Software as a Service (SaaS) delivery models and words and phrases about web sites, e-commerce ...

Ask a Question About lexical scoping (static scoping)Powered by ITKnowledgeExchange.com

Get answers from your peers on your most technical challenges

Tech TalkComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.