Би вам не Си
2025-04-04 11:58![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Вдогонку про представление массивов в языке Би. Поддерживались только одномерные массивы, и назывались они векторами. Из описания языка Би:
7.2 Vector Definitions
An external vector definition has one of the following forms:name [ ] ;
name [ constant ] ;
name [ ] ival , ival . . . ;
name [ constant ] ival , ival . . . ;
The name is initialized with the lvalue of the base of an external vector. If the vector size is missing, zero is assumed. In either case, the vector is initialized with the list of ivals (See 7.1). The actual size of the vector is the maximum of constant+1 and the number of initial values. Any vector elements which are not explicitly initialized have undefined values.
Туманная фраза "The name is initialized with the lvalue of the base of an external vector" означает, что переменная name изначально содержит адрес начала массива.
no subject
Date: 2025-04-05 07:00 (UTC)no subject
Date: 2025-04-05 20:04 (UTC)no subject
Date: 2025-04-06 14:52 (UTC)