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

    C Programming - First assignment not sure how to approach

    Homework Statement Hi, I am currently in a C programming course and i have no background knowledge of programming whatsoever. The professor in my course isn't very good at explaining so I'm a bit lost here. (Please keep in mind, I am NOT asking anyone to do this for me. I would like to know a...
  2. DanielleG

    First Year Physics Assignment - Theory

    Homework Statement Answer true, false, or Cannot tell to teach of the five statements below. A) A 2 kg ball and a 3 kg ball are dropped from a tower. The net forces on each other are the same. B) An astronaut stands on a bathroom scale on the surface of the moon; the scale reads the astronaut's...
  3. N

    AP Physics Summer Assignment Question

    Homework Statement Ts=2π√4.5*10-2kg/2.0*103kg/s2 Homework EquationsThe Attempt at a Solution I just started Physics Yesterday and have no idea what to do.
  4. R

    What Can Parallax Error Tell Us About the Universe?

    Hello Forum, We have an assignment due tomorrow and I need help ASAP. (I asked other forums but no one replied) We had to relate Physics to Biology and thus we are doing something on the Parallax error. We found the basics but three slides with barely anything won't give us marks. Can you guys...
  5. N

    Year 12 EEI - Cathode Ray Tube

    For my year 12 physics EEI (extended experimental investigation) i need to develop some sort of experiment with variables i can change to retrieve data from. I have a basic cathode ray tube from a few months ago much like the one in this video: . Does anyone have any idea of what variables i...
  6. V

    Help Needed: Experienced Mechanical Engineer for Interview

    HIhi, I am currently a college student whose taking introductory course of engineering, and I have an assignment about interviewing a mechanical engineer that has at least two years experiences. Personally I am very interested in mechanical engineering as well, so I wonder would any of you guys...
  7. P

    How does corrosion affect the resistivity of copper wire?

    I'm not sure if corrosion does have a significant effect on copper in general but if it does, how and why does it happen, and the process of it happening and its effect on the overall resistivity? This is for a physics assignment...Please help if you can. Thank you
  8. K

    Third year QM assignment problem

    See the picture below for details. I have included my solution thus far, but it doesn't feel right and I'm just wondering what I am missing. Any assistance would be greatly appreciated, cheers.
  9. J

    Rotational spectrum assignment

    If I have the energy value (in cm-1) of a specific line in the rotational spectrum, how do I find out/assign the correct J''-J' values? I know the selection rules for J to be +/- 1 for each rotational transition but I'm not sure how you can correctly identify which J value it is if your only...
  10. stipan_relix

    A homework assignment including rotation of a rigid body

    Homework Statement The problem is this: A car is evenly slowing down from 30 km/h to 0 in the time of 2 seconds. Radius of its wheels is 30 cm. What is its angular acceleration and what total angle will the wheel describe until it stops? How many turns does the wheel make and what is the length...
  11. parabola

    Help with high school dynamics assignment?

    < Mentor Note -- thread moved to HH from the technical physics forums, so no HH Template is shown > I've searched for help before posting, found this thread that is asking for the same assignment by unfinished so I'll just copy and paste lol...
  12. JamesB93

    Dynamics assignment, power output of car

    I'm currently studying Mechanical Engineering at Level 3 in the UK and I'm beginning my integrated masters in September. I've missed a large chunk of my studies this year due to a broken collarbone I sustained earlier in the year. Instead of getting any special dispensation I'm trying to work my...
  13. S

    Electric Motor Assignment Angular Velocity Question

    Homework Statement Hey so I've made a motor that looks and works exactly like the one in this video The assignment is asking me how I would go about finding the angular velocity, specifically " Analysis of the energy changes involved in the motor to work out the speed/ or angular velocity"...
  14. E

    Graph Mass Position vs Time for Springs Assignment Homework

    Homework Statement When a 100 cm long thing aluminium rod is lodged into the ground, so that it is vertical, it requires 25.0 N of force to deflect it 20.0 cm from the rest position. The rod is then lodged into the side of a wall, and a 100 g of mass is placed at its end and it is then pulled...
  15. Drakkith

    Feedback on a Writing Assignment

    Hey guys. I've got a writing assignment what I'd like to get some feedback on. It's just a little descriptive paragraph, a few hundred words or so. We were supposed to go outside into nature and write a 3rd person description of the setting. No talk of ourselves. What do you think? In the still...
  16. Mingsliced

    Simple Gear Train Efficiency and Torque Help

    Homework Statement I'm on the very last section of a question for the design of a simple gear train. I've managed to design the gear train with all criteria fulfilled and I am confident that it is correct. I just need clarification that my calculations thus far are correct and also a fresh...
  17. T

    Calculating Steel Rod Life with 8000 psi at 1000 °F

    1. Problem statement A steel rod supporting a stress of 8000 psi at 1000 ◦ F is not to exceed 5 % creep strain. Knowing that the steady-state creep rate can be expressed by an equation of the form ##\dot{\epsilon}_{s}^{C}=B|\sigma |^{n} exp \left(\frac{-Q}{kT} \right)## ε⋅, strain rate B...
  18. B

    Assignment help - Determining bearing friction?

    Hi all, I'm new to the forum and have a query with one of my most recent assignments. This one is called 'The flywheel' to do with moments of inertia. I have completed the first lot of calculations using the formula no problem. My average experimental value came out at 0.49 kg m(2) And the...
  19. E

    SeniorPhysics Graded Assignment Help-Horizontal/Vertical Displacement

    Homework Statement A student is rolling a baseball off the roof of their house into their backyard pool.The house is 20 feet tall, and they roll the baseball off the flat roof at speed of 3 m/s towards the pool. How long is the ball in the air and how far away is the distance the pool must be...
  20. H

    My First Assignment: Avionics DC Circuit & Radar

    Hello everyone! I'm just new in here and just signed up great great forum. I've got this course in college "Avionics" and this lecturer gave us this assign in the first class of DC circuit. He wasn't that strict about the topic but he was saying anything about Electronic, anything i mean...
  21. F

    MHB What to do when receiving a bad grade on assignment

    I got 12/24 on my assignment. I am surprised and displeased as I thought I did a good job and I felt I understood the material. I will not give up! I believe this is a sign something needs to changed. I had put a lot of time into the assignment and I don't believe it is feasible to put double...
  22. K

    Gravity, Force and Mass Assignment, Can someone please check it?

    Homework Statement Hello everyone! I have this physics assignment I'm working on. It's 10 questions and I've answered them to the best of my abilities but I wanted to get valuable input from you guys and I have a couple of questions. I would really appreciate any help! Thanks in advance. PS...
  23. K

    Comp Sci Programming assignment question (Java)

    I'm not sure if I came to the right place/forum to ask this question, but I have a programming assignment and I need help on one of the question. It's part of the Peking University's online judge questions. It shouldn't be hard for people who understand it. Link: http://poj.org/problem?id=1005...
  24. C

    Multivariable Calculus - Integration Assignment 1#

    Homework Statement Evaluate the integral, \iiint_E z dzdydz Where E is bounded by, y = 0 z = 0 x + y = 2 y^2 + z^2 = 1 in the first octant.Homework Equations Rearranging y^2 + z^2 = 1 it terms of z , z = \sqrt{1-y^2} The Attempt at a Solution From the given equations I...
  25. C

    Multivariable Calculus - Integration Assignment

    Homework Statement Here is my assignment, http://imgur.com/1edJ3g5 I figured it would be easier if we know we are both looking at the same thing! I'm looking for help with question 2. I seem to be having trouble with the integration. Homework Equations r=acosθ x^2 + y^2 + z^2 = a^2...
  26. C

    Multivariable Calculus - Integration Assignment

    Homework Statement Hello PF! I'm having some trouble on the last part of my assignment, it's question 4 part "c". Here is a picture of the assignment [http://imgur.com/1edJ3g5] ! I'll post this instead of writing it out so we know that we're all looking at the same thing!Homework Equations The...
  27. L

    Energy Efficiency Assignment Help - 9th Grade

    hi everyone so i am working on an assignment to overall find the efficiency of a small electric motor. i need help with the following things: 1. Factors that can affect efficiency of a small motor (i need to talk about mass as the factor) 2. Why it is important to understand efficiency...
  28. H

    Is Option 2 the Only Subset of P(C) in This List?

    Hi everyone, I'm new here. Doing a CS degree and started a Theoretical Computer Science I module beginning second semester. Need to hand in an assignment at the end of this month. I've answered all the questions so far, except one I'm unsure about. I'd appreciate your help and...
  29. C

    Multivariable Calculus - Partial Derivatives Assignment

    1. Marine biologists have determined that when a shark detects the presence of blood in the water, it will swim in the direction in which the concentration of the blood increases most rapidly. Suppose that in a certain case, the concentration of blood at a point P(x; y) on the surface of the...
  30. S

    I've been staring at this Newtons first law assignment for hours

    And I'm starting to feel kind of dumb here... here is the picture to go along with the question Question: Draw a free-body diagram for Point A, showing all the forces acting at A. Resolve the vectors into components, where necessary. Using the first condition of equilibrium, solve...
  31. S

    Could someone check my work on this vector assignment question?

    Would anyone willing to check my work on this vector question? I have an assignment due in a few days and was just wondering if someone could look over one of the questions from this assignment and see if I've done it correctly, as I still don't feel entirely confident with this yet. So the...
  32. R

    Having trouble with CSC assignment. Trying to make an array of Strings

    Homework Statement I need to write a program that takes a text file, and looks for how many unique words it has, as well as the number of times they occur in the file. Homework Equations None The Attempt at a Solution public static void main(String[] args) throws FileNotFoundException {...
  33. Ackbach

    MHB Wackerly/Mendenhall/Schaeffer Problem 2.19: Assignment of Probabilities

    The Bureau of the Census reports that the median family income for all families in the United States during the year $1991$ was $\$35,353$. That is, half of all American families had incomes exceeding this amount and half had incomes equal to or below this amount (Wright 1992, p. 242). Suppose...
  34. A

    Mechanics assignment (please check if my answers are correct)

    Homework Statement As an engineer you are tasked to design a 2m long shaft which is to be manufactured either as a solid circular bar or circular tube. The shaft is required to transmit a torque of 1000Nm without exceeding the allowable strength of the material. Address the following: a)...
  35. V

    Comp Sci Having trouble with last part of JAVA programming assignment.

    You have been commissioned by the US Navy to develop a system for tracking the amount of fuel consumed by fleets of ships. Each ship has a name (ex: "Carrier"), fuel capacity (the maximum amount of fuel the ship can carry), and amount of fuel currently onboard. In this problem, fuel is measured...
  36. M

    Structure of mRNA: Understand with a Photo

    Could anyone describe to me the structure of mRNA. and please attach a photo for better understanding.
  37. N

    C programming: pointer assignment only in main()?

    Hello, I was assigning a pointer to an array and I noticed it will only this to takeplace within the main function: #include <stdio.h> float array_1[10] = { 1,1,2,3,4,5,6,7,8,9 }; float * p_array_1; int main( void ) { p_array_1 = &array_1; printf("array address using ampersand is %p...
  38. T

    Can You Review My HNC ENS-1-TMA Engineering Science Assignment?

    Homework Statement I have made a start to my HNC & finished the first assignment in Engineering Science, Static engineering systems. Homework Equations I have finished all the questions & wondered if I could email my work across for someone to cast an eye over & let me know if...
  39. M

    Differential equations assignment T6

    Hi! I would like to ask anyone with some spare time to check my assignment questions. Last time I was asked to post one task at a time so I will. Thank you in advance for your time. Task 6: In a galvanometer the deflection θ satisfies the diffrential equation: d2θ/dt2+2(dθ/dt)+θ=4...
  40. M

    Differential equations assignment T5

    Hi! I would like to ask anyone with some spare time to check my assignment questions. Last time I was asked to post one task at a time so I will. Thank you in advance for your time. Task 5: Find the particular solution of the following differential equations: a) 12(d2y/dx2)-3y=0...
  41. M

    Differential equations assignment T3

    Hi! I would like to ask anyone with some spare time to check my assignment questions. Last time I was asked to post one task at a time so I will. Thank you in advance for your time. Task 3: A capacitor C is charged by applying a steady voltage E through a resistance R. The p.d. between the...
  42. M

    Differential equations assignment T2

    Hi! I would like to ask anyone with some spare time to check my assignment questions. Last time I was asked to post one task at a time so I will. Thank you in advance for your time. Task 2: Determine the equation of the curve which satisfies the differential equation...
  43. M

    Differential equations assignment T1

    Hi! I would like to ask anyone with some spare time to check my assignment questions. Last time I was asked to post one task at a time so I will. Thank you in advance for your time. Task 1: Solve the differential equation: x(dy/dx)+x2=5 given that y=2.5 when x=1 Solution: x(dy/dx)+x2=5...
  44. A

    A statistics assignment (Binomial distribution)

    So I've translated this assignment from another language, but hope it's good enough translated/understandable. Homework Statement According to the Statistics of Denmark, there was in the construction sector in the period 2009-2011 an average of 920 business bankruptcies per year out of a...
  45. A

    Computer networks Data communication assignment help please

    Homework Statement I have an assignment for Data communication module but the assignment is based on networking. we were given two tables, which we have to fill in. table no -1 is https://www.dropbox.com/s/2mo4faeuau9mw6m/Screen%20Shot%202013-10-31%20at%2018.54.09.png Homework Equations The...
  46. S

    MATLAB [Matlab] Subscripted assignment dimension mismatch.

    Hi all, I have the following program, but with this error [Subscripted assignment dimension mismatch. Error in test_vlf_spherical (line 62) ep(i,j)=ga(i,j)*ep(i,j)+gb(i,j)*((1./r(i)./dr)*(rph*hr(i,j)-rmh*hr(i-1,j))...] i am trying to solve the problem by using (./) but i...
  47. T

    Matlab help. invalid target for assignment trying to solve

    Homework Statement hey there, i'm trying to solve for beta which I tought i'd easily be able to figure out using MATLAB (i'm not the most proficient MATLAB user) but i can't get it to work.. Homework Equations The Attempt at a Solution My code is as follows: clear all...
  48. A

    Software assignment - Evaluate the limit & compare the series

    Software assignment -- Evaluate the limit & compare the series Homework Statement Homework Equations The Attempt at a Solution In part a, I used Microsoft mathematics and found it e In part b, I used \sum but I can't find the right formula I don't want an easy answer but I...
  49. M

    Is my Differentiation Assignment Correct? - Seeking Feedback from Experts

    Hi! I'm new to the forum so first I would like to say 'Hi' to everyone. I would like to ask you to check my assignment. It is already finished (at least I hope it is). Please do not get me wrong. I don't ask anyone to do any work for me. I'm only asking if it's correct. If any part isn't I...
  50. E

    C: warning assignment makes integer from pointer without a cast

    C: "warning assignment makes integer from pointer without a cast" 1. I am trying to assign a color to the variable choice if it is equal to one of the 3 input numbers. if(pred==1) { choice = "RED"; } else if(pred==2) { choice = "GREEN"; } else if(pred==3) { choice =...
Back
Top