Bit shifts

Mohammad-Reza Nabipoor mnabipoor@gnu.org
Wed Feb 4 11:32:09 GMT 2026


Hi Jose.

On Wed, Feb 04, 2026 at 12:07:00PM +0100, Jose E. Marchesi wrote:
> 
> Allright, so I propose we settle on the following behavior, implemented
> by the patch below:
> 
> * In standard Algol 68
> 
>   - ABS (b) < bits_width results in the expected result.
>   - ABS (b) = bits_width results in all bits set to zero.
>   - ABS (b) > bits_width is undefined.
> 
> * In GNU Algol 68
> 
>   - ABS (b) < bits_width results in the expected result.
>   - ABS (b) >= bits_width results in all bits set to zero.
> 
> Note that our behavior is:
> 
> 1. Conformant and backwards compatible.
> 
> 2. Matches well with the similar extension of skip of integral, bits,
>    real, etc values to always yield zeroes.
> 
> 3. Intuitive.
> 
> Any objections?
> 


No objections here.
Very nice.


More information about the Algol68 mailing list