Variable-length array
In computer programming, a variable-length array (VLA), also called variable-sized or runtime-sized, is an array data structure whose length is determined at run time (instead of at compile time).In C, the VLA is said to have a variably modified type that depends on a value (see Dependent type). The main purpose of VLAs is to simplify programming of numerical algorithms.
- Comment
- enIn computer programming, a variable-length array (VLA), also called variable-sized or runtime-sized, is an array data structure whose length is determined at run time (instead of at compile time).In C, the VLA is said to have a variably modified type that depends on a value (see Dependent type). The main purpose of VLAs is to simplify programming of numerical algorithms.
- Has abstract
- enIn computer programming, a variable-length array (VLA), also called variable-sized or runtime-sized, is an array data structure whose length is determined at run time (instead of at compile time).In C, the VLA is said to have a variably modified type that depends on a value (see Dependent type). The main purpose of VLAs is to simplify programming of numerical algorithms. Programming languages that support VLAs include Ada, Algol 68 (for non-flexible rows), APL, C99 (although subsequently relegated in C11 to a conditional feature, which implementations are not required to support; on some platforms, VLAs could be implemented previously with <a href="/wiki/Alloca" class="mw-redirect" title="Alloca">alloca</a> or similar functions) and C# (as unsafe-mode stack-allocated arrays), COBOL, Fortran 90, J, and Object Pascal (the language used in Borland Delphi and Lazarus, that uses FPC). Growable arrays (also called dynamic arrays) are generally more useful than VLAs because dynamic arrays can do everything VLAs can do, and also support growing the array at run-time.For this reason, many programming languages (JavaScript, Java, Python, R, etc.) only support growable arrays.Even in programming languages that do support variable-length arrays, it's often recommended to avoid using (stack-based) variable-length arrays, and instead use (heap-based) dynamic arrays.
- Hypernym
- Structure
- Is primary topic of
- Variable-length array
- Label
- enVariable-length array
- Link from a Wikipage to another Wikipage
- Ada (programming language)
- Algol 68
- APL (programming language)
- Array data structure
- Automatic variable
- Borland Delphi
- C11 (C standard revision)
- C99
- Category:Arrays
- COBOL
- Computer programming
- C Sharp (programming language)
- Dependent type
- Dynamic array
- Fortran
- GNU Compiler Collection
- J (programming language)
- Lazarus (software)
- Linus Torvalds
- Linux kernel
- Memory management
- Object Pascal
- Stack-based memory allocation
- Variably modified type
- SameAs
- 4x7TH
- m.03cl9x0
- Q7915684
- Variable Length Array
- Variable-length array
- Массив переменной длины
- 可变长数组
- 可変長配列
- 가변길이배열
- Subject
- Category:Arrays
- WasDerivedFrom
- Variable-length array?oldid=1124744410&ns=0
- WikiPageLength
- 9358
- Wikipage page ID
- 13854884
- Wikipage revision ID
- 1124744410
- WikiPageUsesTemplate
- Template:Code
- Template:Reflist