In the context of imperative, Algol-like languages, own variables are variables that "belong" to a function definition, or even a block. The value of these variables "persists" through execution of the program, and is the same the next time that definition or block is invoked.
The ability to declare such variables was a feature of ALGOL 60.
From the decsystem 10/20 ALGOL programmer's guide:
OWN variables are a special kind of ALGOL variable, and may be of type integer, real, long real, Boolean or string, either scalar or array. The variables have the following properties:
- Although following the normal scope rules, the variables are not recursive; the same copy of each variable being used in all occurrences of a procedure or block.
- When control passes out of a block, the values are retained and are still available when the block is re-entered.
- The initial value is set to zero before execution of the program. (FALSE in the case of Boolean OWN variables.) OWN STRINGS are initialized to possess no byte string.
OWN variables are declared by writing the usual declaration with the word OWN preceding it. For example:
OWN INTEGER I,J,K; OWN REAL ARRAY THETA[l:M];
An old description of a denotational semantics for own-variables appears in a chapter of [Gordon 1979].
The introduction to that chapter is curiously interesting, and advocates the use of formal semantics for a real world language feature that is considered "badly designed":
The semantics of own-variables vividly shows how an at first sight intuitively clean construct is in fact very messy and fraught with subtle ambiguities. Thus it illustrates one kind of insight one can rapidly gain by attempting a formal description. It is true that the various ambiguities were discovered without using any formal methods, but their uncovering took several years. Had a formal semantics been attempted the ambiguities would immediately have revealed themselves and one would have been forced to face and resolve them. Also semantic concepts enable one to concisely and lucidly articulate all the possible interpretations.
Gordon, Michael J. C. The Denotational Description of Programming Languages. New York, NY: Springer New York, 1979. https://doi.org/10.1007/978-1-4612-6228-2.
@book{gordon_1979,
location = {New York, {NY}},
title = {The Denotational Description of Programming Languages},
publisher = {Springer New York},
author = {Gordon, Michael J. C.},
date = {1979},
doi = {10.1007/978-1-4612-6228-2},
}