On Mon, 17 Jun 2019, Allin Cottrell wrote:
> On Sun, 16 Jun 2019, Artur Tarassow wrote:
>
> > I really like the C-style if-else syntax as well as the C-style '++' and
> > '--' operators for incrementing and decrementing a number, respectively. But
> > I am surprised to see that the following does
Am 17.06.19 um 23:29 schrieb Sven Schreiber:
> Am 17.06.2019 um 18:14 schrieb Allin Cottrell:
>
>
>> According to the C standard an operation such as
>>
>> s = s++
>>
>> leads to undefined behavior. In general, "s++" means, yield the current
>> value of s then increment s, but with s itself on
Am 17.06.2019 um 18:14 schrieb Allin Cottrell:
> According to the C standard an operation such as
>
> s = s++
>
> leads to undefined behavior. In general, "s++" means, yield the current
> value of s then increment s, but with s itself on the left it's not
> clear what has to be done. So, not
On Sun, 16 Jun 2019, Artur Tarassow wrote:
> I really like the C-style if-else syntax as well as the C-style '++' and '--'
> operators for incrementing and decrementing a number, respectively. But I am
> surprised to see that the following does not work:
>
>
> scalar s = 0
> loop i=1..2 -q
>
Am 16.06.19 um 16:52 schrieb Sven Schreiber:
> Am 16.06.2019 um 16:03 schrieb Artur Tarassow:
>
>>
>> scalar s = 0
>> loop i=1..2 -q
>> catch s = (i==1) ? 1 : +1 # no effect
>> s
>> catch s = (i==1) ? 1 : s++ # no effect
>> s
>> catch s = (i==1) ? 1 : s+1 # works