what's a different?..
eem_murat
Posts: 8
hi all,
IF (cm1>50) AND (cm2>50) AND (cm3>50) THEN .....,
IF ((cm1>50) AND (cm2>50) AND (cm3>50)) THEN....··this line has·extra ()
you thing is there a different betwen this line?· or·all of them work same?..
and ı wonder that what is the different from (&·---- and)
when ı used "&"·or · " and" they work same in uplines..
and ı write aproximately 300 lines program and it include if..then, do..while.. or lots of another loop . and ı use bs2. you think, bs2 is enough·microcontroller for my program. ı only wonder cycle speed...
·
IF (cm1>50) AND (cm2>50) AND (cm3>50) THEN .....,
IF ((cm1>50) AND (cm2>50) AND (cm3>50)) THEN....··this line has·extra ()
you thing is there a different betwen this line?· or·all of them work same?..
and ı wonder that what is the different from (&·---- and)
when ı used "&"·or · " and" they work same in uplines..
and ı write aproximately 300 lines program and it include if..then, do..while.. or lots of another loop . and ı use bs2. you think, bs2 is enough·microcontroller for my program. ı only wonder cycle speed...
·
Comments
These lines:
Are functionally equivalent. Pbasic doesn't require the outside parentheses in IF..THEN statements:
is the same as
I often write such phrases WITH the parentheses, though, because I am used to languages like Perl where parentheses are required for conditional statements (in other words, to my eye it looks funny without them). But that's just me.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
These lines:
Are functionally equivalent. Pbasic doesn't require the outside parentheses in IF..THEN statements:
is the same as
I often write such phrases WITH the parentheses, though, because I am used to languages like Perl where parentheses are required for conditional statements (in other words, to my eye it looks funny without them). But that's just me.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST