any other language can do these?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Alboin wrote:But it is...
/agreed. Craze Frog: you are starting more and more to fit the stereotype of someone who rants about something they don't understand...
Craze Frog
Member
Member
Posts: 368
Joined: Sun Sep 23, 2007 4:52 am

Post by Craze Frog »

Alboin wrote:
Craze Frog wrote:
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...
Yes, that's logical, but it's not how it works in C.
But it is...
Ok, so if = always assigns, actually it "assigns in ANY situation", then these statements are equal?

Code: Select all

a <= b;
a = a < b;
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.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Oh my god. Seriously.
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.
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?

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.
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post by Zacariaz »

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.
This was supposed to be a cool signature...
Tyler
Member
Member
Posts: 514
Joined: Tue Nov 07, 2006 7:37 am
Location: York, England

Post by Tyler »

You're all just really fucking stupid. It's embarasing to see so-called "Operating System Developers" arguing over an aesthetic technicality that doesn't matter to anything. You're all wrong, get over it and go do some work.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Post by Candy »

= -> 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).
Craze Frog
Member
Member
Posts: 368
Joined: Sun Sep 23, 2007 4:52 am

Post by Craze Frog »

JamesM wrote:Oh my god. Seriously.
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.
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?

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 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.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

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.
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Post by neon »

Craze Frog wrote:
JamesM wrote:Oh my god. Seriously.
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.
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?

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 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.
Does it matter? You are still comparing two completely different operations.

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();}
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post by Zacariaz »

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.
This was supposed to be a cool signature...
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

am i right in assuming that:

"a <= b" equal "(a < b) || (a == b)"
Yes :)
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.
And yet '<=' was used in ASCII-ised mathematical literature before C was designed. Hence it's inclusion.

JamesM
Tyler
Member
Member
Posts: 514
Joined: Tue Nov 07, 2006 7:37 am
Location: York, England

Post by Tyler »

You all just went from Stupid, to Retarded.

We get that not one of you is reading anyone elses posts and can't comprehend the difference between the technical and the aesthetic, please stop trying to prove it to anyone else who reads the post.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

You're right Tyler: I'm sorry, I shouldn't have participated in this flamewar.
User avatar
binutils
Member
Member
Posts: 214
Joined: Thu Apr 05, 2007 6:07 am

Re: any other language can do these?

Post by binutils »

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
should be used like this:

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
Post Reply