/agreed. Craze Frog: you are starting more and more to fit the stereotype of someone who rants about something they don't understand...Alboin wrote:But it is...
any other language can do these?
-
- Member
- Posts: 368
- Joined: Sun Sep 23, 2007 4:52 am
Ok, so if = always assigns, actually it "assigns in ANY situation", then these statements are equal?Alboin wrote:But it is...Craze Frog wrote:Yes, that's logical, but it's not how it works in C.JamesM wrote: No, I said it's logical that '==' means "test for equality" in ANY situation, and '=' means "assign the value of" in ANY situation. I still think you don't quite comprehend what you're saying...
Code: Select all
a <= b;
a = a < b;
Oh my god. Seriously.
As I've tried to explain: in English "Let x be equal to" and "If x is equal to y" both use the word 'equal' (represented by an =) but mean different things.
But it IS a different operator! Completely different! It's a completely different lexical token. '<=' has NOTHING to do with '='. Why can't you understand this?No, don't tell me that <= is a different operator. It is. But ANY situation mean ANY situation and not just the one situation where = is freestanding.
As I've tried to explain: in English "Let x be equal to" and "If x is equal to y" both use the word 'equal' (represented by an =) but mean different things.
i this this is going to far but i want to ask one last question
how would you group these operator:
=
!=
==
<=
+=
|=
*=
and then explain it to some caveman who basicly dont know anything.
Yes this is far out, but while there might be alot of thing that crazy frog doesnt seem to comprihend there is certainly allso a thing or two that i believe he does.
how would you group these operator:
=
!=
==
<=
+=
|=
*=
and then explain it to some caveman who basicly dont know anything.
Yes this is far out, but while there might be alot of thing that crazy frog doesnt seem to comprihend there is certainly allso a thing or two that i believe he does.
This was supposed to be a cool signature...
= -> assignment operator, you change something to something else.
+=, -=, /=, &= etc. -> Perform operation with item on the left and assign the new value to it
<=, ==, >= -> compare two objects (which returns a bool which you cannot assign, usually, to the object on the left, so it would be foolish to think it does).
+=, -=, /=, &= etc. -> Perform operation with item on the left and assign the new value to it
<=, ==, >= -> compare two objects (which returns a bool which you cannot assign, usually, to the object on the left, so it would be foolish to think it does).
-
- Member
- Posts: 368
- Joined: Sun Sep 23, 2007 4:52 am
I think you need to look up the work ANY. ANY doesn't mean "in this particular situation". It means ANY situation, including where it's part of a different token. Else it's not ANY, but SOME or ONE. Basic English.JamesM wrote:Oh my god. Seriously.
But it IS a different operator! Completely different! It's a completely different lexical token. '<=' has NOTHING to do with '='. Why can't you understand this?No, don't tell me that <= is a different operator. It is. But ANY situation mean ANY situation and not just the one situation where = is freestanding.
As I've tried to explain: in English "Let x be equal to" and "If x is equal to y" both use the word 'equal' (represented by an =) but mean different things.
But why limit the use of a symbol by your small congnitive ability?
It's quite obvious by context which token means which, and as I've explained 3 times before, it's the way it works in English. I notice you have never replied to that point.
I can't understand the use of the 'o' character. Seriously, C SUCKZ0RZ!! sometimes it can be used in the 'bool' keyword, sometimes in 'long' , sometimes in an identifier! ugh! how crass!
Tyler: I know. I don't know why I'm replying to these, they've just got me so riled up.
It's quite obvious by context which token means which, and as I've explained 3 times before, it's the way it works in English. I notice you have never replied to that point.
I can't understand the use of the 'o' character. Seriously, C SUCKZ0RZ!! sometimes it can be used in the 'bool' keyword, sometimes in 'long' , sometimes in an identifier! ugh! how crass!
Tyler: I know. I don't know why I'm replying to these, they've just got me so riled up.
Does it matter? You are still comparing two completely different operations.Craze Frog wrote:I think you need to look up the work ANY. ANY doesn't mean "in this particular situation". It means ANY situation, including where it's part of a different token. Else it's not ANY, but SOME or ONE. Basic English.JamesM wrote:Oh my god. Seriously.
But it IS a different operator! Completely different! It's a completely different lexical token. '<=' has NOTHING to do with '='. Why can't you understand this?No, don't tell me that <= is a different operator. It is. But ANY situation mean ANY situation and not just the one situation where = is freestanding.
As I've tried to explain: in English "Let x be equal to" and "If x is equal to y" both use the word 'equal' (represented by an =) but mean different things.
You seem to be looking for an "all encompassing" operator used in every situation. In this case, an ASSIGNMENT operator being used in all situations of the symbol "=".
However, there are no languages at all that has this, so stop with the "C++ bashing" stuff. Like all other languages--including programming and human, there are no "perfect" language. Your ideal of a "perfect" language is different from person to person.
Stop the language bashing--it's childish, stupid, and gets nowhere.
If you do not like C++, then don't use it. Please keep in mind, however, that alot of your statments in this thread has shown that you do not know the language very well, and base things off of limited knowledge and/or ignorance.
I apologize if this sounded harsh.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
I will give it a last try and the forget about this.
am i right in assuming that:
"a <= b" equal "(a < b) || (a == b)"
assuming im right, im quite sure i am, consider this:
"a <= b" equal "(a < b) || (a = b)"
Which makes no sence as its two different types of operations
I can think of only two logacaly outcomes when combining < and ==:
<||== (overkill i think)
<== (pure logic)
yes <= i one character shorter and we have been using it all our lives and it would be hell to change it know, but that doesnt alter the fact that is it infact not completely right.
See you in another topic.
am i right in assuming that:
"a <= b" equal "(a < b) || (a == b)"
assuming im right, im quite sure i am, consider this:
"a <= b" equal "(a < b) || (a = b)"
Which makes no sence as its two different types of operations
I can think of only two logacaly outcomes when combining < and ==:
<||== (overkill i think)
<== (pure logic)
yes <= i one character shorter and we have been using it all our lives and it would be hell to change it know, but that doesnt alter the fact that is it infact not completely right.
See you in another topic.
This was supposed to be a cool signature...
Yesam i right in assuming that:
"a <= b" equal "(a < b) || (a == b)"
And yet '<=' was used in ASCII-ised mathematical literature before C was designed. Hence it's inclusion.yes <= i one character shorter and we have been using it all our lives and it would be hell to change it know, but that doesnt alter the fact that is it infact not completely right.
JamesM
Re: any other language can do these?
should be used like this:int *pint = 1234; //bad code, except for to access specific hardware address
int *litre; // bad code, if below line comes together
*litre = 1234; // bad code
Code: Select all
int a = 0; // if a's address is located at 0x000000001234, normally, compiler address the address(1234).
int *pint = &a
Code: Select all
int b = 0;
int *litre = &b;
*litre = 1234; // b's value is 1234