Talk:Assignment (computer science)

Untitled
I'm trying to learn programming and was looking for a definition for the differences between Assigment and Equality, the wikipidia provided half the answer but I couldn't easily find or understand the other half so I just did my own definition (I "got it" running the code). Not sure if this is correct but it makes sense to me. Using Python btw.

Assignment is where a value is assigned to a variable. It can be easily thought of as a statement so in the example below  equals.

>>> var = "hello world" >>> print var hello world

Equality. It can be easily thought of as a question so if we continue the example and pose the question does  equal  ? we return the answer.

>>> var == "hello world" True

— Preceding unsigned comment added by 220.101.76.209 (talk) 04:18, 15 May 2005 (UTC)

x86 MOV instruction
RE: "Machine language and assembly language MOV is not an "assignment statement") "

1: i don't think you are correct, though you may have a technical reason for making that statement. in any event, MOV is at least equivalent, or else analogous, to assignment.

2: so what? all i added was a see also link. if you want to see how you move data around in x86 assembler (which is what assignment is used for in highlevel languages), then see the x86 assembler MOV instruction. if you want to see the fundamental instruction that a high-level assignment statement will compile to, see the x86 assembler MOV instruction. Sahuagin 14:36, 4 May 2007 (UTC)


 * Programming language constructs are not the same thing as machine instructions.
 * Even if they were, there is no particular reason to link to the x86 assembler instruction. Why not the corresponding Java bytecode, ARM instruction (there are more of them in the world than there are x86's), and (hey, why not?) IBM 360 instruction?
 * You are mistaken about what an assigment statement "will compile to". MOV is a machine instruction used to implement assignment in some cases. In other cases, assignment is implemented using a register-to-register instruction (e.g. a=a+1 where a is in a register), a block copy (when the thing being assigned is big), or sometimes even nothing at all at runtime. --Macrakis 16:34, 4 May 2007 (UTC)

"MOV is a machine instruction used to implement assignment in some cases". works for me. Sahuagin 21:37, 4 May 2007 (UTC)

MOV is used for many things, including implementing assignment. Assignment is compiled into many things, including MOV. I don't think it makes sense to try to compress a discussion of programming language compilation into a "see also" reference to a machine instruction, especially not a particular instruction set architecture's machine instruction. --Macrakis 02:17, 7 May 2007 (UTC)

I agree with Macrakis. I see no reason to link to MOV at all. I can see why someone might think MOV is related to assignment, but the relationship is in fact tenuous. A link to a discussion of compiling assignment statements would be appropriate. — Chris Page 21:36, 8 May 2007 (UTC)

assignment compatibility
Neither this article nor the English-spoken Wikipedia mentions the very important issue of assignment compatibility - this is really a blind spot, since the broadly non-existing assignmenz compatibility in programming languages and executable programs is responsible for many, many vulnerabilities, software bugs and endless and unnecessary debugger sessions at runtime. I really do not understand why this important topic seems to be neglected if not ignored by so many academics (and unfortunately this was also the case for many programming language designers).

If you understand German you may refer to de:Zuweisungskompatibilität.--Bautsch (talk) 09:36, 11 October 2011 (UTC)

Article is incomplete
This article is incomplete without mention and guidance towards ASCII, Unicode, and XHMTL and such topics. See the Ampersand article for comparison and other possible treatments and relative expansion directions. As a natural reference to the instance needed, this 'missing' treatment sucks for quick answers. Ditto the formulation of the HTML page I tried earlier. I don't need the binary, just the HTML/XHTML a wiki will parse properly including a template. People have time pressures, so why not accommodate that aspect with a one row table? // Fra nkB 16:55, 16 June 2013 (UTC)
 * BUT I'm merely trying to code something and need a unicode value, and neither article has been the reference to such one would and should expect. A table of such codes should be locally on the article where such codes are so universal as a quick look up place, even as the last section before references.


 * 1) I don't really understand your question. Have you figured out an answer since you posted?
 * 2) Does this article help you: String literal ?
 * 3) What are the connections between assignment and ASCII, Unicode or XHTML?
 * 4) There are a couple of short tables at Notation. Do they help, and if not, why not?
 * 5) Can you add the missing table yourself?
 * --Hroðulf (or Hrothulf) (Talk) 09:16, 3 July 2015 (UTC)

drive letter assignment in see-also?
Why do we need a link to "drive letter assignment" in this article? Where is the relation (apart from the word assignment) to the assignment as described in this article here? IMHO this link is completely useless - even misleading - and should be removed completely. 79.193.248.193 (talk) 14:47, 9 September 2013 (UTC)

79.193.248.193 (talk) 14:47, 9 September 2013 (UTC)


 * Good call. This is likely an attempt to disambiguate this usage, which is placed at a generic title related with computing, to make readers aware that the other meaning also has an article. I've moved it to a hat note so that it's clear that their meanings are not related. Diego (talk) 15:07, 9 September 2013 (UTC)

Assignment versus initialization
This article (Semantics, right above Single assignment) mixes up two different concepts – assignment and initialization. The difference can be seen clearly in C++ when overloading assignment operator or creating copy constructor. I don't feel very confident though to rewrite this part. 78.128.196.3 (talk) 12:24, 20 September 2013 (UTC)
 * Initialization is one form of assignment, and the specific differences are explained in the Single assignment section. That in C++ there's an specific syntax for the initial and the other assignments doesn't make them essentially different. What do you find in the Semantics section that would need rewriting to deal with that particular kind of assignment? Diego (talk) 12:47, 20 September 2013 (UTC)

Interwikis
This page has Wikidata entry: https://www.wikidata.org/wiki/Q231158 with versions in multiple languages. For some reason, the "Languages" sidebar in English article does not show any interwiki links to articles in other languages, even though there are interwiki links to English article from articles in other languages. Is it just for me or something is broken? I could not find any information about this in help. — Preceding unsigned comment added by 31.13.144.50 (talk) 02:10, 3 July 2015 (UTC)


 * Pictogram voting keep.svg Fixed It is not just you, but nothing was broken. The wikidata only gets updated in wikipedia when the article is edited or purged, which I did a few seconds ago. (I used this method.) --Hroðulf (or Hrothulf) (Talk) 09:03, 3 July 2015 (UTC)


 * Thanks! Just fixed identical problem in an article in another language. — Preceding unsigned comment added by 31.13.144.4 (talk) 14:40, 3 July 2015 (UTC)

External links modified
Hello fellow Wikipedians,

I have just modified 1 one external link on Assignment (computer science). Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
 * Added archive https://web.archive.org/web/20101119190821/http://www.ibm.com:80/developerworks/java/library/j-cb07186.html to http://www.ibm.com/developerworks/java/library/j-cb07186.html

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at ).

Cheers.— InternetArchiveBot  (Report bug) 02:58, 20 October 2016 (UTC)

Career option and opportunities in IT
Computer science 2409:40E6:D:126A:8000:0:0:0 (talk) 16:12, 28 June 2024 (UTC)