dbo:abstract
|
- In computer programming, a nested function (or nested procedure or subroutine) is a function which is defined within another function, the enclosing function. Due to simple recursive scope rules, a nested function is itself invisible outside of its immediately enclosing function, but can see (access) all local objects (data, functions, types, etc.) of its immediately enclosing function as well as of any function(s) which, in turn, encloses that function. The nesting is theoretically possible to unlimited depth, although only a few levels are normally used in practical programs. Nested functions are used in many approaches to structured programming, including early ones, such as ALGOL, Simula 67 and Pascal, and also in many modern dynamic languages and functional languages. However, they are traditionally not supported in the (originally simple) C-family of languages. (en)
- Une fonction imbriquée ou fonction interne est une fonction dont la définition est encapsulée dans une autre fonction.Elle ne peut être appelée que par la fonction englobante ou par des fonctions imbriquées directement ou non dans la même fonctionenglobante. En d'autres termes, la portée de la fonction imbriquée est limitée par la fonction englobante; elle offre un contrôle très strict de leur visibilité (scope) par le reste du programme. (fr)
- Em programação, uma subrotina aninhada (ou função aninhada) é uma subrotina encapsulada noutra. O contexto da subrotina aninhada é limitado à subrotina que a encapsula. Isso significa que ela pode ser chamada somente pela subrotina que a encapsula, ou pelas subrotinas diretamente ou indiretamente aninhadas pela mesma subrotina encapsuladora. O aninhamento é teoricamente ilimitado, ainda que na prática somente alguns níveis são aceitos, o que depende da implementação. Essa técnica é uma forma de encapsulamento, e é útil para dividir tarefas procedimentais em subtarefas que fazem sentido somente localmente. Em linguagens que aceitam a técnica, outros tipos de aninhamento também são geralmente aceitos, como o aninhamento de constantes e tipos de dado. Havendo suporte, as subrotinas aninhadas são uma forma comum de implementar algoritmos com laços de repetição em linguagens funcionais. (pt)
- Вкладена функція (вкладена процедура чи вкладена підпрограма, англ. nested function) — у комп'ютерному програмуванні функція, яка визначена всередині іншої функції, функції охоплювальної (англ. enclosing function). У зв'язку з правилами дії області визначення процедур та змінних, вкладена функція, таким чином, має доступ до локальних змінних охоплювальної функції і вкладена функція не може бути доступна за межами охоплювальної функції. Рівень вкладених функцій теоретично можливий будь-якої глибини, однак в практичних програмах використовується, як правило, тільки кілька рівнів. Вкладені функції використовуються в багатьох парадигмах програмування. В багатьох сучасних динамічних і функціональних мовах вкладені функції надзвичайно корисні та вживані. В структурному програмуванні також часто застосовується в «поважних» мовах, таких як Алгол, Симула, Паскаль та Фортран. В C++ вкладені функції можна реалізувати за допомогою лямбда-виразів. (uk)
|
rdfs:comment
|
- Une fonction imbriquée ou fonction interne est une fonction dont la définition est encapsulée dans une autre fonction.Elle ne peut être appelée que par la fonction englobante ou par des fonctions imbriquées directement ou non dans la même fonctionenglobante. En d'autres termes, la portée de la fonction imbriquée est limitée par la fonction englobante; elle offre un contrôle très strict de leur visibilité (scope) par le reste du programme. (fr)
- In computer programming, a nested function (or nested procedure or subroutine) is a function which is defined within another function, the enclosing function. Due to simple recursive scope rules, a nested function is itself invisible outside of its immediately enclosing function, but can see (access) all local objects (data, functions, types, etc.) of its immediately enclosing function as well as of any function(s) which, in turn, encloses that function. The nesting is theoretically possible to unlimited depth, although only a few levels are normally used in practical programs. (en)
- Em programação, uma subrotina aninhada (ou função aninhada) é uma subrotina encapsulada noutra. O contexto da subrotina aninhada é limitado à subrotina que a encapsula. Isso significa que ela pode ser chamada somente pela subrotina que a encapsula, ou pelas subrotinas diretamente ou indiretamente aninhadas pela mesma subrotina encapsuladora. O aninhamento é teoricamente ilimitado, ainda que na prática somente alguns níveis são aceitos, o que depende da implementação. (pt)
- Вкладена функція (вкладена процедура чи вкладена підпрограма, англ. nested function) — у комп'ютерному програмуванні функція, яка визначена всередині іншої функції, функції охоплювальної (англ. enclosing function). У зв'язку з правилами дії області визначення процедур та змінних, вкладена функція, таким чином, має доступ до локальних змінних охоплювальної функції і вкладена функція не може бути доступна за межами охоплювальної функції. Рівень вкладених функцій теоретично можливий будь-якої глибини, однак в практичних програмах використовується, як правило, тільки кілька рівнів. (uk)
|