Talk:Assignment (computer science)
|WikiProject Computing||(Rated Start-class)|
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 vs Equality
Assignment is where a value is assigned to a variable. It can be easily thought of as a statement so in the example below
>>> 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
hello world? we return the answer
>>> var == "hello world" True
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)
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).
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.
- 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.
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? // FrankB 16:55, 16 June 2013 (UTC)
- I don't really understand your question. Have you figured out an answer since you posted?
- Does this article help you: String literal ?
- What are the connections between assignment and ASCII, Unicode or XHTML?
- There are a couple of short tables at Notation. Do they help, and if not, why not?
- Can you add the missing table yourself?
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. 220.127.116.11 (talk) 14:47, 9 September 2013 (UTC)
18.104.22.168 (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. 22.214.171.124 (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)
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 126.96.36.199 (talk) 02:10, 3 July 2015 (UTC)
- 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)
Hello fellow Wikipedians,
I have just modified 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
You may set the
|checked=, on this template, to true or failed to let other editors know you reviewed the change. If you find any errors, please use the tools below to fix them or call an editor by setting
|needhelp= to your help request.
- If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
- If you found an error with any archives or the URLs themselves, you can fix them with this tool.
If you are unable to use these tools, you may set
|needhelp=<your help request> on this template to request help from an experienced user. Please include details about your problem, to help other editors.