What is Assignment: Definition and 358 Discussions

In computer programming, an assignment statement sets and/or re-sets the value stored in the storage location(s) denoted by a variable name; in other words, it copies a value into the variable. In most imperative programming languages, the assignment statement (or expression) is a fundamental construct.
Today, the most commonly used notation for this basic operation has come to be x = expr (originally Superplan 1949–51, popularized by Fortran 1957 and C) followed by x := expr (originally ALGOL 1958, popularised by Pascal), although there are many other notations in use. In some languages the symbol used is regarded as an operator (meaning that the assignment statement as a whole returns a value) while others define the assignment as a statement (meaning that it cannot be used in an expression).
Assignments typically allow a variable to hold different values at different times during its life-span and scope. However, some languages (primarily strictly functional) do not allow that kind of "destructive" reassignment, as it might imply changes of non-local state. The purpose is to enforce referential transparency, i.e. functions that do not depend on the state of some variable(s), but produce the same results for a given set of parametric inputs at any point in time. Modern programs in other languages also often use similar strategies, although less strict, and only in certain parts, in order to reduce complexity, normally in conjunction with complementing methodologies such as data structuring, structured programming and object orientation.

View More On Wikipedia.org
  1. A

    Solving a Truss Analysis Assignment - Choose the Suitable Beam

    hello guys i ahve assigment , this assigment talk about the truss analysis the assigment is 3 parts first part : analysis the framework & show the tension & compression , i used method if sections , i have done this part. second part : analysis by using STRAND7 & choose the suitable...
  2. B

    Gen. Chem. 2 Lab assignment help

    Homework Statement Heat of Reaction for the combustion of Magnesium Data: A. Mass MgO = 0.7975g Volume 1M HCl = 97.5 ml Temp.intial = 24.2 C Temp.final = 29.3 C \DeltaT = 5.1 C B. mass Mg 0.0896g Volume 1M HCl 89.5 ml Temp...
  3. A

    Help Needed: Graph Theory Assignment on Vertex Colouring

    I am working on graph theory assignment. I need help because I am not seeing where I am going with this question. Here's the question: G is a simple graph with n vertices. -> show that vertex colouring of G [ X(G) ]* vertex colouring of G complement >= n -> show that the vertex...
  4. S

    Writing a letter asking for possible assignment

    Hello, i seem to have a conundrum on my hands that i hope the kind people on here might be able to give me some tips about how to handle. I am currecntly working on my bachelor degree in physics, and have one more year before I'm finnished with that and will go on to my masters(and finally...
  5. W

    Help! I'm Behind on a Physics Homework Assignment!

    I've been out 8 days and i missed this entire chapter, with a test on monday so I am trying to get all caught up. but i don't know how to do any of this homework. Homework Statement the mass is 3.80 kg, T = 16 N, and = 35 degrees. The surface has no friction. If x is horizontal and y...
  6. A

    How hard of an assignment does this look like for Vector Calculus?

    My course is supposed to go from basic vector algebra to extrema, curl and divergence, (stopping before multiple integration) I don't need any help on this assignment I am just wondering how hard it looks compared to everything else. http://tinypic.com/r/2ly29u8/6
  7. H

    Solving Physics Assignment: Launching a Plastic Stirrer with Electricity

    Homework Statement Your physics assignment is to figure out a way to use electricity to launch a small 6.0-cm-long plastic drink stirrer. You decide that you'll charge the little plastic rod by rubbing it with fur, then hold it near a long, charged wire. When you let go, the electric force...
  8. M

    CIRCUITS Assignment Help: Get Answers Now!

    CIRCUITS Assignment Help Please :) Homework Statement Alright I was given an assignment and I have done all the questions, but I'm not sure if they are right and would like some help if they aren't. 1. A wire has resistivity 5.6 x 10^-8 Ωm at 20 °C and a temperature coefficient of resistance...
  9. L

    Reading and looping (assignment)

    Homework Statement Hi everyone ,, I've got the following assignment and it's very hard for me ,, I couldn't understand half of it ,, that's if it's not all -_- The assignment is : Homework Equations The Attempt at a Solution OK ,, am at the first step which is...
  10. K

    Square Grid and Letter Assignment Puzzle

    Place the letters A, B, C, D, E, F, G, H and I into a 3x3 square grid with each square containing a different letter, using the following information: (i) I is in the same column as E which is not in the center column. (ii) D is in the row below the row which contains F. (iii) A is in...
  11. B

    Chem Poster Assignment Help: Rates, Condition and Chem Rxns.

    Hi there, I'm new to the forums so pardon me if i make mistakes such as posting to the proper forum. Homework Statement I need to investigate and analyze conditions needed to maximize the efficiency of common natural or industrial reactions and explain how the improved efficiency of the...
  12. C

    Learning Perl & Apache for a Uni Assignment

    hey everyone, I'm a 3rd year uni student studying software engineering, and I recently got my first job working in an IT office at my school. One of my first assignments is to combine two Perl modules that deal with the Apache web server. I've never done work with Perl or Apache before, but...
  13. F

    Math Homework Woes: Extra Credit Assignment for My Son

    Homework Statement It's an extra credit assignment assigned by my math teacher, I sort of tried it but I'm not very good, and not too sure what else to do, this part isn't my strong suit. Here's the problem: (A) "If my son would live forever and he grows 1 inch this week, 1/2 inch next...
  14. D

    How do I compute the moment in my statics assignment?

    Statics assignment a bit urgent So here is my assignment. i wish that someone could help me. now i know that this system is statically determinate and that i can compute the forces. my problem is that i cannot figure out how i can compute the moment. the Aim of the assignment is to find all...
  15. D

    Why Is My Damped Oscillator Experiment So Challenging?

    Hello guys! I'm REALLY and i mean REALLY frustrated due to the fact that i just can't solve this stupid assignment! I did a experiment at school with a weight attached to a spring. The weight was then set to do some swings where it sink into some water, a so called damped oscillator. I...
  16. F

    Calculating Time and Velocity of Two Stones Dropped from a Cliff

    Homework Statement A man stands at the top of a 50.0 m cliff hanging over a calm pool of water. The man throws the two balls vertically 1.0s apart and observes that they cause a single splash when it hit the water. The first stone has an initial velocity of +2.0 m/s. a) How long after relese...
  17. I

    Comp Sci Smoothing Data and Identifying Hot and Cold Spots in Fortran 90

    Homework Statement Write a program that that prompts the user for a filename of data, reads the data from the input file, smooths the data using the average value of the cell value and all of the nearest neighbors -9 cell average for interior cells -6 cell average for edge cells -4 cell...
  18. V

    Wanna Start a assignment on converting Vibrational energy to Electrical energy

    hey guys! i want to start a new project in my college with my friends... we have thought of something like converting vibrational energy to electrical energy with the help of peizoelectric crystal! please can anybody point us to direction as where to start practically.. we have theoratical...
  19. V

    Solved: Gas Problem Assignment | Pressure Equalization

    Homework Statement Container A holds an ideal gas at a pressure of 5x10^5 Pa and a temperature of 300 K. It is connected by a thin tube (and closed valve) to container B, with four times the volume of A. Container B holds the same ideal gas at a pressure of 10^5 Pa and a temperature of 400 K...
  20. V

    What Is the Final Pressure in Both Containers After Equalization?

    Homework Statement Container A holds an ideal gas at a pressure of 5x10^5 Pa and a temperature of 300 K. It is connected by a thin tube (and closed valve) to container B, with four times the volume of A. Container B holds the same ideal gas at a pressure of 10^5 Pa and a temperature of 400 K...
  21. T

    EE Assignment Electricity and magnetism

    Feel Free to give tips or answers to any or all of these questions Homework Statement 1. Two Point charges qa and qb are located on the x- axis at x=a and x=b on the graph of E the x-component of E. a) What are the signs of qa and qb? b)What is the ratio of|qa/qb|? c) Draw a graph of...
  22. S

    Assignment help needed. (banked curves, Newton's second law)

    I was solving my assignment questions, and found two questions particularly challenging. So I post this thread to get some helps. 1. Homework Statement Question 1. Astronauts have connected a line between their 3500kg space tug and a 6200 kg asteroid. Using their ship's engine, they pull on...
  23. M

    How Can Poisson Distribution Determine Refinery Capacity Needs?

    Well, first i will have to make an apology for putting the question in this forum, but was not really sure where else i could put it. :) The assignment is: The number of oil tankers, arriving at a certain refinery on one day, follow a poisson distribution with the parameter µ=2. The present...
  24. P

    Assignment on approximations for calculus

    I'm doing an assignment on approximations for calculus and I feel that I don't really have a strong background and was hoping that someone maybe has a website, or even a few pointers, so that I can better my understanding. Right now I'm working on "Find two term approximations for the...
  25. E

    Comp Sci How to Handle Decimal Precision in C++ for BMI Calculations?

    This is our very first assignment in C++, from the very first week of class so we don't know a whole lot yet. Keep that in mind. Homework Statement Write a program that will: -input someone's height in feet and inches -output that person's height in centimeters -output the weight in...
  26. B

    How Do You Calculate the Frequency of a Pendulum?

    Vibrations Assignment Please Help! Homework Statement A pendulum takes 0.5s to swing from its hgihest point to the equilibrium position. What is the frequency of the pendulum? Homework Equations f = 1/T The Attempt at a Solution So would it be this? f = 1/T f = 1/0.5 f = 2Hz
  27. K

    Power and value assignment puzzle

    Substitute each capital letter in bold by a different digit from 0 to 9, such that (TAU).BETA when rounded off to the nearest integer is equal to PI, and the absolute difference of (TAU).BETA and PI is the minimum. Each of T, B and P is nonzero.
  28. R

    Formula One: physics assignment

    Im fairly new to this forum and wasnt sure where to post this thread also I am fairly new to physics and not so sure if I am saying things right haha so hope this is alright im doing a research assignment based on formula one, and was wondering if anyone could suggest a good aspect of...
  29. D

    Calculating Current and Energy in Circuit with Resistors and Batteries

    Hi out there! I've been handled 3 questions which for me is rather hard and therefore I'm asking the experts. Any help would be great:) Donkey Kong Question 1) A circuit consists of a 15Ω and a 30Ω resistor connected in parallel across a battery of internal resistance 2 Ω. If 60W is...
  30. O

    What is the Trajectory of Four Rockets in a Square Formation?

    Hi, first I want to apologize for my english. I'm not from an English speaking country and I have to practise. I have a quite interesting physical assignment for you. I was trying but I still can't solve it. If you would have an idea or if you would know how to solve it please let me...
  31. S

    How Do I Calculate the Maximum Weight a Frictionless Pulley Can Support?

    Homework Statement QUESTION 3 Assume that the pulley at A is a small frictionless pulley. The cord AB, and the cord supporting the block are made from the same cord. Determine the maximum weight rounded down to the nearest Newton of the block that can be suspended in the position shown if...
  32. P

    A Third Year Student's Unexpected Fellowship Assignment

    I am a third year student of Integrated M.Sc. Physics in India. My primary research interest is General Relativity, Quantum Gravity and the study of black holes. I decided to apply for a summer fellowship in IAS ( Indian Academy of Sciences), where I clearly mentioned my research interests as...
  33. I

    Semester one assignment: Find the angular speed

    Homework Statement A thin rod of lenth 1.5m is oriented vertically, with its bottom end attached to the floor by means of a frcitionless hinge. The mass of the rod may be ignored compared to the mass of and object ixed to the top of the rod. The rod, starting from rest, tips over and rotates...
  34. S

    Assignment on Machining centers

    can anyone tell me what exactly a machining center is? from googling it i find lots of sites that are selling cnc machines.. can anyone give me a link that has detailed info about cncs their uses and purposes working etc..? any help will be appreciated thanks in advance
  35. S

    Need Help with C Assignment to Compute a Pendulum's Motion?

    Homework Statement The assignment is to compute the motion of a pendulum in C. The relevant information is listed in this document: http://home.orange.nl/~kuip3148/pendulum.c It says which values to use for the variables, the relevant equations and has the value of NSTEPS, DT and...
  36. C

    Assignment where i have to make conjectures.

    I am in the process of completing an assignment where i have to make conjectures. As of now I have made conjectures that for function P(n)=(n^x)-n is divisible by x for all x that are prime numbers, And that for x choose r=k, k belonging to the natural numbers, that k is a multiple of x when...
  37. Y

    Need Help With My Unit Assignment (DUE December 5th)

    Need Help With My Unit Assignment!(DUE December 5th) Ok guys I really need help with My Chemistry Unit Assignment, it is due in a couple of days and I haven't even started it because I don't really understand it. My teacher sucks at teaching and I also pay attention to him everyday. It is 5...
  38. G

    Solving for the normal force (Physics assignment)

    Unfortunately, I'm totally lost on this question. I read the topic in the archive, and I know I can't ask for an answer to this, and frankly I don't want one. But is someone able to give me the process for doing this? Homework Statement A cart loaded with bricks has a total mass of 24.3 kg...
  39. N

    Which Cell Type Is Best Suited for Specific Functions?

    Homework Statement Can someone please help A.S.A.P. I have a science assignment due tomorrow and it's 11:00 and I'm getting very frustrated. I'm about to go to bed and i'll forget about it in the morning. Ok i have 3 pictures. i tried drawing them on paint but it won't work, any ideas on...
  40. G

    [Lab] Coursework assignment ideas

    Hi guys, I thought this would be the best place to post, We are currently preparing for our physics course work assignment (I am in year 13, 17 years old, in the UK). We have to come up with at least three idea before we decided on one to do. Now I have thought of quite a few but I don't...
  41. S

    Need Help with Calculus Assignment? Check Out These Solutions!

    Homework Statement hello, i really need help with my calculus assignment please. i looked over it many times and still no idea how to do it, what we have for lectures is completely different from this first assignment. i am a first year student at university. i uploaded the assignment online...
  42. S

    How to Handle Matrix Operations and Pair Finding in C?

    Enter integer rectangle matrix A(0..n,0..m). Give out entered matrix by columns. Find all element pairs with equal value and their index and give them out. I have to write c programm for this , can anyone make the body of this exercise and share some instructions how i should approach to...
  43. M

    Checking Answers of Chemistry Assignment

    Firstly, I'd like to so thank you for all your help so far =D I have an chemistry assignment due tomorrow, and just wanted to double check some questions. Questions 1. (a) Write balanced molecular equations for the following potential precipitation reactions. Indicate the states of...
  44. G

    Physics summer assignment vector multiplication

    Homework Statement In the product (Vector F) = q(Vector v) X (Vector B), take q = 2, (Vector v) = 2.0i + 4.0j + 6.0k (Vector F) = 4.0i - 20j + 12k What than is (Vector B) in unit-vector notation if Bx = By Homework Equations dot and cross products The Attempt at a Solution...
  45. I

    Bohr's Atomic Theory: Postulates, Spectral Lines & Quantum Effects

    (a) The first postulate of Bohr deals with the existence of stationary states in which the electron has constant energy even as it orbits around the nucleus. Bohr was the first person to postulate this idea of stationary states. Express this key assumption in the language of the...
  46. I

    Discovering the Failures of Classical Physics: A Quantum Experiment Analysis

    This experiment describes some of the failures of classical physics. Details of this experiment can be found in many sources, and it is interesting to work out the explanation and discover some of the joys of Quantum mechanics. The basic apparatus consists of a polarizer. When light is passed...
  47. K

    What point does a 90 degree rotation move (0, 1) to?

    I've got a math assignment for uni and I got not idea how to do it. I'm willing to pay 100 usd for someone to do it for me. mail me at irortm@gmail.com if interested, pay via paypal.
  48. F

    How Does Register Handling Affect Function Calls in IA32 Assembly?

    Homework Statement //this function is the callee int func(int num1, int num2) { int t = num1 * num2; return t - (num1 + num2); } //this is the caller int main() { int a = 4; int b = 8; int c = func(a, b); return 0; } When caller calls callee, callee does not...
  49. L

    Self writing program and long string assignment in C

    I would like to write a C program that writes itself to the screen (without reading from disk). My idea is to assign text to a string S, split it into two parts S1 and S2 and then write each part twice. If S1 is made equal to program part before text definition and S2 equal to program part...
  50. G

    Solving a Gr. 11 Physics Assignment: Finding Vertical Displacement of a Potato

    I have to find the vertical displacement of a potato shot out of a potato launcher (Gr. 11 Physics assignment). It would make sense (and make this easier) to assume that the potato went straight up and down and I am allowed to assume that air resistance is negligible. My main problem is proving...
Back
Top