In one of the examples that cicciocb has proposed, [Local Link Removed for Guests], I notice that it already uses the INC function, although I assume that it will only be incorporated in the latest versions of Annex :
INC x equals x = x + 1
I see that the inverse function, DEC, also works:
DEC x equals x = x – 1
This fixes an old Electroguard wish. Congratulations, because I find it very useful. I wanted to propose that before its publication and definitive documentation, the names should be changed to INCR and DECR, which seem more representative and do not lead to errors in the case of DEC (by decimal).
Building on the message, I wanted to propose that you add two constants to Annex, FALSE (= to 0) and TRUE (= to 1).
And that, in the routines defined by the user, it offers the possibility of allowing the omission of some parameters when calling them, replacing their content with default values. It should be possible because lots of Annex instructions do this. Specifically, the parameters enclosed in square brackets in the documentation.
I know this is all whims, but we must begin to respect the whims of our elderly people.
INC and DEC
- Fernando Perez
- Posts: 378
- Joined: Mon Feb 15, 2021 10:09 pm
- Location: Santander (Spain)
- Has thanked: 195 times
- Been thanked: 267 times
- cicciocb
- Site Admin
- Posts: 2095
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 450 times
- Been thanked: 1385 times
- Contact:
Re: INC and DEC
yes I implemented inc and dec since some time.
The syntaxi is
INC variable [,increment]
DEC variable [,decrement]
so
INC a -> = a + 1
INC a, 2 -> a=a+2
INC a,b -> a = a+b
the same for DEC
Yes, I can rename INC and DEC to INCR and DECR and also create TRUE and FALSE
about the default value, I must see the effort required and the impact on the performances
The syntaxi is
INC variable [,increment]
DEC variable [,decrement]
so
INC a -> = a + 1
INC a, 2 -> a=a+2
INC a,b -> a = a+b
the same for DEC
Yes, I can rename INC and DEC to INCR and DECR and also create TRUE and FALSE
about the default value, I must see the effort required and the impact on the performances
- cicciocb
- Site Admin
- Posts: 2095
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 450 times
- Been thanked: 1385 times
- Contact:
Re: INC and DEC
Implemented in version 1.50.5 but renamed as INCR and DECR in version 1.50.8 (final names)