Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (henrybane), 1,499 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
And/or #243415
12/29/08 22:42
12/29/08 22:42
Joined: Jul 2007
Posts: 288
Germany, NRW
Martek Offline OP
Member
Martek  Offline OP
Member

Joined: Jul 2007
Posts: 288
Germany, NRW
Kurze Frage,
gibt es in 3DGS And/or, also einen Vergleich, der true ist wenn eins oder beide wahr sind? Ich mein das währ doch der And/or Vergleich. Oder muss ich das durch ne kompliziertere if-Abfrage lösen?

Mfg, Martek


3D Gamestudio A7 Extra
Re: And/or [Re: Martek] #243445
12/30/08 00:56
12/30/08 00:56
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
i used http://freetranslation.com/ so sorry for grammar

Code:
if ((true == true) || (false == true)){ 
=true (or)
Code:
if ((true == true) && (false == true)){ 
=false (and)

hope this helps

Re: And/or [Re: MrGuest] #243536
12/30/08 16:33
12/30/08 16:33
Joined: Jul 2007
Posts: 288
Germany, NRW
Martek Offline OP
Member
Martek  Offline OP
Member

Joined: Jul 2007
Posts: 288
Germany, NRW
No, I mean if there is this in a shorter version???
Code:
if((x == true && y == true) ||(x == true || y = true))



3D Gamestudio A7 Extra
Re: And/or [Re: Martek] #243552
12/30/08 18:47
12/30/08 18:47
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
oh, then yes,

Code:
 if(x && y) 
for x and y true

Code:
 if(x || y) 
for x or y true

Code:
 if(!x && !y) 
for x and y false

or write a macro for checking if you want shorter than that

Re: And/or [Re: MrGuest] #243554
12/30/08 19:00
12/30/08 19:00
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
if((x == true && y == true) ||(x == true || y = true))

this is same as x or y : if(x||y)



and there is a xor(^) but

if(true^true) = false
if(false^false) = false
if(ture^false) = true


3333333333
Re: And/or [Re: Quad] #243573
12/30/08 20:42
12/30/08 20:42
Joined: Jul 2007
Posts: 288
Germany, NRW
Martek Offline OP
Member
Martek  Offline OP
Member

Joined: Jul 2007
Posts: 288
Germany, NRW
No it' not the same because in your version it's false if x and y are true, but I need true if one or both are true...


3D Gamestudio A7 Extra
Re: And/or [Re: Martek] #243575
12/30/08 20:49
12/30/08 20:49
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
if(x||y)

this works when both are true and only one is true.

i just mentioned ^as a side note.


3333333333
Re: And/or [Re: Quad] #243587
12/30/08 21:17
12/30/08 21:17
Joined: Jul 2007
Posts: 288
Germany, NRW
Martek Offline OP
Member
Martek  Offline OP
Member

Joined: Jul 2007
Posts: 288
Germany, NRW
Oh, it works. But the manual says something different. So thank you for your help...


3D Gamestudio A7 Extra

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1