closed

Loginbox

Please enter your username and password into the following fields to log in.


  • Username:
  • Password:
  •  
  • Auto log in on every visit.


  •  

Extending toggle procedure to boolean



Merlin offline
Schreiberling
Avatar
Gender: male
Location: UNITED KINGDOM 
Age:
Posts: 853
Registered: 03 / 2005
Private message
Subject: Extending toggle procedure to boolean  -  Posted: 06.03.2019 - 12:12   -  
Toggle( x ) applies to byte, bits and bitfields. Other structures including boolean are prohibited. I would like to see toggle( boolean ) implemented. I would be happy for it to be identical to toggle(byte).
Merlin.

:magic:

Software is a black art.
go down go up
Lschreyer offline
Benutzer
Avatar
Gender: n/a
Location: n/a 
Age:
Posts: 430
Registered: 02 / 2007
Private message
Subject: Re: Extending toggle procedure to boolean  -  Posted: 13.03.2019 - 09:45   -  
I wrote a

procedure toggleb(b: Boolean);
begin
if b then
b:=false;
else
b:=true;
endif;
end;

to do just that :-)
go down go up
rh offline
Administrator
Avatar
Gender: male
Location: GERMANY  Germany
Age:
Posts: 5415
Registered: 03 / 2002
Homepage Private message
Subject: Re: Extending toggle procedure to boolean  -  Posted: 13.03.2019 - 14:05   -  
Oder
b:= Not b;

Aber was solls. Toggle(boolean) ist jetzt implementiert!
Sie readme File
rolf
Cars don't buy cars -- Autos kaufen keine Autos.
Henry Ford
go down go up
Gunter offline
Administrator
Avatar
Gender: male
Location: GERMANY  Frankfurt Main / Germany
Age:
Posts: 1607
Registered: 02 / 2003
Private message
Subject: Re: Extending toggle procedure to boolean  -  Posted: 13.03.2019 - 17:34   -  
oder letztlich nix weiter als ein
b := b XOR $FF

Gunter
2 Dinge sind unendlich: das Universum und die menschliche Dummheit.
Aber bei dem Universum bin ich mir noch nicht ganz sicher
--
Albert Einstein

---
The concept of global warming was created by and for the Chinese in order to make U.S. manufacturing non-competitive
--
Donald J. Trump on Twitter
This post has been edited 3-times. Last edit: 13.03.2019 - 22:35 by Gunter.
go down go up
 


Registered users in this topic
Currently no registered users in this section

Delete cookies of this forum  •  FAQ / Help  •  Team page  •  Imprint   |  Local time: 21.03.2019 - 09:21