q2K BHP
Black History Portal
THE BHP WIRE —
HIDDEN TRUTHS
What's New!
THE JOURNEY THROUGH TIME

Explore Black History

Explore the people, places, events, achievements, struggles and stories that shaped our journey.

✊🏾

Civil Rights

Movements, leaders, victories and the continuing fight for equality.

⚙️

Black Inventors

Innovation, patents, science, technology and world-changing contributions.

🏆

Sports

Pioneers, champions, Negro Leagues, records, activism and excellence.

♟️

People

Meet the people whose lives, choices and achievements shaped the journey.

📍

Places

Black towns, communities, institutions and places where history happened.

📜

Events

Moments that changed communities, movements, institutions and the nation.

Enter a person, place, event, or topic.
MY'STORY

The MOVE Fire

This is a personal recollection on the Move fire on May 13, 1985 Philadelphia police fired thousands of rounds at the MOVE house, city officials approved dropping an explosive device on the roof, the resulting fire was allowed to burn, 11 people—including five children—died, and 61 homes were destroyed. Philadelphia City Council later called it a “brutal attack carried out by the City of Philadelphia on its own citizens” and acknowledged that no individual faced criminal consequences for the bombing. One timeline correction worth preserving for the BHP record: the major previous MOVE-police confrontation was August 8, 1978, about seven years before the bombing, not a year or two earlier. Officer James Ramp was killed, other police and firefighters were wounded, nine MOVE members were later convicted, and television cameras recorded police beating Delbert Africa during his arrest. The 1985 MOVE Commission later specifically criticized city planners for failing to adequately use lessons from that 1978 confrontation. And that actually strengthens the point you’re making: 1985 did not happen without precedent or institutional memory. There had already been a deadly confrontation with MOVE, years of conflict, negotiations and police involvement before Osage Avenue.

MORE →
BLACK FACTS
The Truths They Never Taught You...

Wilmington 1898 — An American Coup

Wilmington, North Carolina once had a thriving Black middle class and an elected interracial government. In 1898 white supremacists used violence to overthrow that government, kill Black residents and drive many others from the city.

MORE →
BHP gathered finds from its connected research sources. Showing the 4 strongest Black History matches.
← BACK TO RESULTS
Wikipedia

Dynamic variable

In computer programming, a dynamic variable is a local variable that is created to reside in manually allocated memory that can be allocated and deallocated. It is divided into three types, namely implicit heap dynamic variable, explicit heap dynamic variable and lost heap dynamic variable (dangling pointers). It has indefinite scope and dynamic extent. It is mostly used in niche programming languages which include Lisp, Ruby, APL, PHP, TcL, TEX and PERL.[1]

Types of dynamic variables

[edit]
  • Implicit heap dynamic variable – Dynamic variables where the values are bound to heap storage on assignment, and allocation with release occurs when new value is assigned e.g. all variables in JavaScript, PHP and APL. It is more flexible than the explicit heap dynamic variable as a larger memory can be allocated when the required memory size is unknown.
let l = 10; // value stored in heap memory implicitly
let b = 20;
area = l * b;
  • Explicit heap dynamic variable – Dynamic variables that are allocated and deallocated by explicit run–time instructions as specified by the programmer. Few examples are dynamic objects in C++ and objects in Java.
int main() {
    int* y = new int(1); // creating dynamic variable *y
    for (int i = 0; i < 5; i++) {
        if (*y <= 5)
            cout << *y << endl;
        (*y)++; // increment the value via pointer
    }
    delete y; // deleting variable to prevent memory leak
    return 0;
}
  • Lost heap dynamic variable – Dynamic variables which are no longer referenced by the pointer. When the heap dynamic variable is lost, the process is called memory leak. It is created by a first pointer pointing to a new heap dynamic variable and then the pointer is shifted to another heap dynamic variable. In memory leak, if the first heap dynamic variable is not used, it will be lost.
    int *a = new int(10); // allocating to heap dynamic variable
    a = new int(20); // re-allocating to same variable without freeing memory

History

[edit]

During the development of LISP language in the late 1950s, garbage memory collection as a form of dynamic memory management was used in automatic and dynamic allocation in LISP. It was meant to automate memory management instead of the programmer to manually delete used memory space. Algorithms such as mark and sweep, reference counting and copy algorithm were fundamental to garbage collection concept. Although John McCarthy developed these algorithms, both McCarthy and Marvin Minsky were key figures to develop LISP.[2]

Earlier concepts of dynamic variable was used in ALGOL 68 which had used both heap and stack allocation for variable assignment. Pointer type and limited garbage collection for heap allocation was also used in it.[3]

Designed in 1968–69, the dynamic variable was first named and defined in Pascal, a programming language developed by Niklaus Wirth in 1970. Here, the dynamic variables were described as pointers which stored the memory of referenced variables. Allocation of memory to the pointers was done by NEW and deallocation by DISPOSE command.[4]

Dynamic object, pointers and the types of dynamic variables across different programming languages was first described in depth in the 1989 book by Robert Sebesta, "Concepts of Programming Languages".[5]

Addressing

[edit]

Indirect addressing mode is used in these variables in which address is determined during runtime rather than assembly. This mode is found in x86 computer architecture.

Scope and extent

[edit]

In terms of scope (computer programming) and extent of variable, dynamic variable is local unlike static variable (global), which means it can be only used in the function where it is defined and to reuse it with a different value will require deallocation and re-allocation. The lifetime of dynamic variable is controlled by the programmer. Memory to the dynamic variable is allocated on run-time and to avoid memory leak, the dynamic variable must be deallocated before re-use.

Simply put, dynamic variables have indefinite scope, meaning the variable binding can be seen by any code used in the program, and dynamic extent, meaning variable binding is seen only between the time of creation and time when control leaves the code using dynamic variable during execution. Hence it can't be seen in Python as all created variables are global or having lexical scope.

Dynamic objects are created in main method when the number of objects to be used is unknown thus making it more flexible than static objects by allowing dynamic memory allocation. In the below snippet, the constructor class Counter is automatically invoked when dynamic object *c is created and the value 5 is assigned. When the control deletes (delete) the object, the destructor ~Counter is called and the output gets printed.

class Counter {
    int value;
public:
    Counter(int start) { // Constructor called on object initialization
        value = start;
    }

    ~Counter() { // Destructor called when object destroyed
        value--;
        cout << value; // prints 4
    }
};

int main() {
    Counter* c = new Counter(5);
    delete c;
    return 0;
}

See also

[edit]

References

[edit]
  1. ^ "Dynamic variables". dl.acm.org. doi:10.1145/378795.378857. Retrieved 2026-05-29.
  2. ^ Nystrom, Robert (2021-07-27). Crafting Interpreters. Genever Benning. ISBN 978-0-9905829-4-6.
  3. ^ Branquart, Paul, and Johan Lewi. "A Scheme of Storage Allocation and Garbage Collection for Algol 68." Algol 68 Implementation. 1970.
  4. ^ Price, Ana M. de A. (February 1984). "Defining dynamic variables and abstract data types in Pascal". ACM SIGPLAN Notices. 19 (2): 85–91. doi:10.1145/948566.948574. ISSN 0362-1340.
  5. ^ Sebesta, R. W. (2016). Concepts of programming languages. Pearson Education India.

Further reading

[edit]

Source: Wikipedia. Article content is retrieved live through the MediaWiki API.

No preview image
Wikipedia

Dynamic variable

In computer programming, a dynamic variable is a local variable that is created to reside in manually allocated memory that can be allocated and deallocated. It is divided into three types, namely implicit heap dynamic variable, explicit heap dynamic variable and lost heap dynamic variable (dangling pointers). It has indefinite scope and dynamic extent. It is mostly used in niche programming languages which include Lisp, Ruby, APL, PHP, TcL, TEX and PERL.

MORE →
Wikipedia

Variable-message sign

A variable- (also changeable-, electronic-, or dynamic-) message sign or message board, often abbreviated VMS, VMB, CMS, or DMS, and in the UK known as a matrix sign, is an electronic traffic sign often used on roadways to give travelers information about special events. Such signs warn of traffic congestion, accidents, incidents such as terrorist attacks, Amber/Silver/Blue Alerts, roadwork zones, or speed limits on a specific highway segment. In urban areas, VMS are used within parking guidance and information systems to guide drivers to available car parking spaces. They may also ask vehicles to take alternative routes, limit travel speed, warn of duration and location of the incidents, inform of the traffic conditions, or display general public safety messages.

MORE →
Wikipedia

Dynamic array

In computer science, a dynamic array, growable array, resizable array, dynamic table, mutable array, or array list is a random access, variable-size list data structure that allows elements to be added or removed. It is supplied with standard libraries in many modern mainstream programming languages. Dynamic arrays overcome a limit of static arrays, which have a fixed capacity that needs to be specified at allocation. A dynamic array is not the same thing as a dynamically allocated array or variable-length array, either of which is an array whose size is fixed when the array is allocated, although a dynamic array may use such a fixed-size array as a back end.

MORE →
No preview image
Wikipedia

Dynamic programming language

A dynamic programming language is a type of programming language that allows various operations to be determined and executed at runtime. This is different from the compilation phase. Key decisions about variables, method calls, or data types are made when the program is running, unlike in static languages, where the structure and types are fixed during compilation. Dynamic languages provide flexibility. This allows developers to write more adaptable and concise code. For instance, in a dynamic language, a variable can start as an integer. It can later be reassigned to hold a string without explicit type declarations. This feature of dynamic typing enables more fluid and less restrictive coding. Developers can focus on the logic and functionality rather than the constraints of the language.

MORE →
TOPIC OF THE DAY

Greenwood / Black Wall Street

Before the 1921 destruction of Tulsa’s Greenwood District, Black residents had created a remarkable center of business and community life. The district included stores, professional offices, entertainment venues and homes owned by Black citizens. Understanding Greenwood means learning what was built—not only what was burned.

MORE →
TRIVIA QUESTION OF THE DAY

Which heavyweight champion was known as the “Brown Bomber”?

Joe Louis.