Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Xiija
Newbie


Joined: 24 Apr 2018
Posts: 9

PostPosted: Wed Nov 17, 2021 4:23 pm   

basic expression help
 
this is returning "less than" .. why plz?

#if ( 1 > 0 ) {#say greater} {#say less than}

i have even tried

#if ( (1 > 0) ) {#say greater} {#say less than}

ETA:

apparently zmud hates spaces?

#if (1 > 0) {#say greater} {#say less than} works :P
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4429
Location: Pensacola, FL, USA

PostPosted: Wed Nov 17, 2021 7:13 pm   
 
It's a matter of implicit concatenation.
" 1" is a string
Comparing strings to numbers like that returns false.
That issue is no longer present in CMUD.
_________________
Discord: Shalimar#3679
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net