Jump to page: 1 2
Thread overview
What are 'op' codes?
Aug 19, 2004
kinghajj
Aug 19, 2004
J C Calvarese
Aug 19, 2004
John Reimer
Aug 19, 2004
kinghajj
Aug 19, 2004
kinghajj
Aug 19, 2004
John Reimer
Aug 19, 2004
Stephen Waits
Aug 19, 2004
kinghajj
Aug 19, 2004
Matthew
Aug 19, 2004
Andy Friesen
Aug 19, 2004
kinghajj
Aug 19, 2004
Andy Friesen
Aug 19, 2004
Ivan Senji
Aug 19, 2004
Regan Heath
Aug 19, 2004
Matthew
Aug 19, 2004
J C Calvarese
Aug 19, 2004
John Reimer
Aug 19, 2004
J C Calvarese
August 19, 2004
My guess is that they handle what the class does when used in an operater (like '==', '+', etc.). Is that so, and how do you use them?


August 19, 2004
kinghajj wrote:
> My guess is that they handle what the class does when used in an operater (like
> '==', '+', etc.). Is that so, and how do you use them?

Thanks to the power of Google, I'll submit my guess.

http://www.wlug.org.nz/OpCodes

Op Codes

The names given to individual instructions in AssemblyLanguage. Different CPU families have different op codes, and assembler has mnemonic names for the different instructions (which to the CPU are just 1s and 0s).

For Intel x86 machines, common codes include JMP, AND, XOR, INT, MOVL, PUSH, POP, CALL, and so on.


-- 
Justin (a/k/a jcc7)
http://jcc_7.tripod.com/d/
August 19, 2004
J C Calvarese wrote:

> kinghajj wrote:
> 
>> My guess is that they handle what the class does when used in an operater (like
>> '==', '+', etc.). Is that so, and how do you use them?
> 
> 
> Thanks to the power of Google, I'll submit my guess.
> 
> http://www.wlug.org.nz/OpCodes
> 
> Op Codes
> 
> The names given to individual instructions in AssemblyLanguage. Different CPU families have different op codes, and assembler has mnemonic names for the different instructions (which to the CPU are just 1s and 0s).
> 
> For Intel x86 machines, common codes include JMP, AND, XOR, INT, MOVL, PUSH, POP, CALL, and so on.
> 
> 

Wasn't he just asking about operator overloading?  You know... opCmp opEquals, opAdd, and such...
August 19, 2004
In article <cg1mdh$12mg$1@digitaldaemon.com>, John Reimer says...
>
>J C Calvarese wrote:
>
>> kinghajj wrote:
>> 
>>> My guess is that they handle what the class does when used in an
>>> operater (like
>>> '==', '+', etc.). Is that so, and how do you use them?
>> 
>> 
>> Thanks to the power of Google, I'll submit my guess.
>> 
>> http://www.wlug.org.nz/OpCodes
>> 
>> Op Codes
>> 
>> The names given to individual instructions in AssemblyLanguage. Different CPU families have different op codes, and assembler has mnemonic names for the different instructions (which to the CPU are just 1s and 0s).
>> 
>> For Intel x86 machines, common codes include JMP, AND, XOR, INT, MOVL, PUSH, POP, CALL, and so on.
>> 
>> 
>
>Wasn't he just asking about operator overloading?  You know... opCmp opEquals, opAdd, and such...

Yes, I was, and I've already answered my own question (by reading the documentation "Operator Overloading"). It's a nice feature : I can see how it's so usefull!


August 19, 2004
In article <cg1oah$18br$1@digitaldaemon.com>, kinghajj says...
>
>In article <cg1mdh$12mg$1@digitaldaemon.com>, John Reimer says...
>>
>>J C Calvarese wrote:
>>
>>> kinghajj wrote:
>>> 
>>>> My guess is that they handle what the class does when used in an
>>>> operater (like
>>>> '==', '+', etc.). Is that so, and how do you use them?
>>> 
>>> 
>>> Thanks to the power of Google, I'll submit my guess.
>>> 
>>> http://www.wlug.org.nz/OpCodes
>>> 
>>> Op Codes
>>> 
>>> The names given to individual instructions in AssemblyLanguage. Different CPU families have different op codes, and assembler has mnemonic names for the different instructions (which to the CPU are just 1s and 0s).
>>> 
>>> For Intel x86 machines, common codes include JMP, AND, XOR, INT, MOVL, PUSH, POP, CALL, and so on.
>>> 
>>> 
>>
>>Wasn't he just asking about operator overloading?  You know... opCmp opEquals, opAdd, and such...
>
>Yes, I was, and I've already answered my own question (by reading the documentation "Operator Overloading"). It's a nice feature : I can see how it's so usefull!
>
>
OK, now another question about the 'op' codes.

You know how C++ has the cout stream, and it workd like this: cout << "Whatever, " << variable << " again";

How could you do that in D?


August 19, 2004
In article <cg1mdh$12mg$1@digitaldaemon.com>, John Reimer says...
>
>J C Calvarese wrote:
>
>> kinghajj wrote:
>> 
>>> My guess is that they handle what the class does when used in an
>>> operater (like
>>> '==', '+', etc.). Is that so, and how do you use them?
>> 
>> 
>> Thanks to the power of Google, I'll submit my guess.
>> 
>> http://www.wlug.org.nz/OpCodes
>> 
>> Op Codes
>> 
>> The names given to individual instructions in AssemblyLanguage. Different CPU families have different op codes, and assembler has mnemonic names for the different instructions (which to the CPU are just 1s and 0s).
>> 
>> For Intel x86 machines, common codes include JMP, AND, XOR, INT, MOVL, PUSH, POP, CALL, and so on.
>> 
>> 
>
>Wasn't he just asking about operator overloading?  You know... opCmp opEquals, opAdd, and such...

Apparently so. If he would've asked what op functions like opCmp were I would've answered a whole other question.

In the future, I guess I'll leave the psychic hotline questions to Miss Cleo....

jcc7
August 19, 2004
> OK, now another question about the 'op' codes.
> 
> You know how C++ has the cout stream, and it workd like this:
> cout << "Whatever, " << variable << " again";
> 
> How could you do that in D?
> 
> 

Operator overloading...

You can do the exact same thing in D if the library you are using has overloaded those operators in such a fashion.  Although overloading shift operators in such a way is not popular to everyone in D (I don't like it).

The only library that currently lets you do it that way, that I know of, is mango on its io streams.  But mango also gives an alternative way to do the same thing, thankfully.

Later,

John
August 19, 2004
J C Calvarese wrote:

> 
> Apparently so. If he would've asked what op functions like opCmp were I would've
> answered a whole other question.
> 
> In the future, I guess I'll leave the psychic hotline questions to Miss Cleo....
> 
> jcc7

Hey, what are you saying, Justin?  You looking for a fight with me and my psychic abilities?

j/k  :-)
August 19, 2004
In article <cg294n$1v55$2@digitaldaemon.com>, John Reimer says...
>
>J C Calvarese wrote:
>
>> 
>> Apparently so. If he would've asked what op functions like opCmp were I would've answered a whole other question.
>> 
>> In the future, I guess I'll leave the psychic hotline questions to Miss Cleo....
>> 
>> jcc7
>
>Hey, what are you saying, Justin?  You looking for a fight with me and my psychic abilities?

LOL, no.

I'm just tired of when people ask a vague question, and I get criticized for answering the wrong question. Just too thin skinned, I suppose. I wasn't mad at you.

>
>j/k  :-)

jcc7
August 19, 2004
kinghajj wrote:
> You know how C++ has the cout stream, and it workd like this:
> cout << "Whatever, " << variable << " again";
> 
> How could you do that in D?

Hopefully you can't.

The thing is, you aren't going to find many, or any, in this group of people that believe that overloading operator << to deal with stream output is a good idea.

Personally, I suggest you forget you ever saw that in C++.

--Steve
« First   ‹ Prev
1 2