square brackets: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: square brackets
| Old | New | Line | |
|---|---|---|---|
| 1 | + | \[ \] | |
| 2 | + | ||
| 3 | + | The left square bracket `[` is defined in [[ASCII]] as having the value is `91` ([[Hexadecimal|hexadecimal]] [[Dollar sign|$]]`5B`). In [[Pascal]] it always appears in conjunction with a corresponding right square bracket `]` is defined in ASCII as having the value is `93` (hexadecimal `$5D`) constituting a pair. | |
| 4 | + | ||
| 5 | + | Such a pair is used to: | |
| 6 | + | ||
| 7 | + | - Static [[Array|array]] the [[Type|type]] definition | |
| 8 | + | - Accessing array Elements. An element is accessed by indexing the array name. This is done by placing the index or [[Variable|variable's]] [[Identifier|identifier]] of the element within square brackets after the name of the array. | |
| 9 | + | - Define an empty [[Set|set]] : `someset := [];` | |
| 10 | + | - Using brackets to hold set elements | |
| 11 | + | - [[Custom Attributes]] | |
| 12 | + | ||
| 13 | + | --- | |
| 14 | + | *From the Free Pascal wiki, page "square brackets", as it stood on 2019-11-09 after a change by Djzepi, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
