text:
Talk:Ampere

Untitled

 * Please add new topics as new sections at the bottom.

Old comments not in any section
Any chance of a simple definition? One that a high school student could understand? VoltageX 01:49, 19 November 2006 (UTC)

The Ampere is still a base unit: see the page of the International Bureau of Measurement.

 * Still? Are you expecting them to change it? -- Tim Starling 13:28, Dec 16, 2003 (UTC)

 * Yes. Once we are able to reliably count individual electrons, that will be a much more precise way of measuring many electrical quantities. Then I expect the Coulomb to become the base unit -- re-defined as containing some arbitrary number of electrons -- and the Ampere re-defined as one Coulomb per second. --DavidCary 02:41, 15 Jan 2005 (UTC)

Although amp is commonly used, the NIST defines amp as incorrect usage. It should be ampere or the symbol "A". —Preceding unsigned comment added by 12.188.106.66 (talk) 14:38, 19 March 2008 (UTC)

>> The smallest commonly used submultiple of the ampere is the milliampere (mA), which is one thousandth of an ampere.
 * No way. One might write something like "Commonly used magnitudes range from 40 ampere home wiring down to picoampere bias currents of FET OPamps", but there are no true limits to this definition of 'commonly used'. — How about a table that compares light bulbs, a big CPU, LEDs, US/European home wiring, flashlights, transatlantic power lines, lightning bolts, car stereos, etc. ? It would take up half the space of the current article though (don't you hate that pun). Femto 15:11, 3 Nov 2004 (UTC)

 * Ironically, given the poster's name, the smallest commonly used unit of current is the femtoampere, not the picoampere. I have some electrometer op-amps with bias currents in the low single-digit fA.Enon (talk) 09:02, 24 December 2010 (UTC)

Link suggestions
An automated Wikipedia link suggester has some possible wiki link suggestions for the Ampere article, and they have been placed on this page for your convenience. Tip: Some people find it helpful if these suggestions are shown on this talk page, rather than on another page. To do this, just add to this page. — LinkBot 10:23, 17 Dec 2004 (UTC)

-- User:LinkBot/suggestions/Ampere

Linkbot suggestions
Now that I know that links are suggested automatically by a bot, I'll be less hesitant to remove ones that are fairly lame. 84.227.254.143 (talk) 06:18, 31 March 2014 (UTC)

Definition
From what I can determine from the article, it seems that the ampere and the coulomb are defined in terms of each other. Am I correct in assuming this? Leenewton 3 July 2005 11:55 (UTC)

It appears that way at first, but if you read closer into the article you'll find the actual definition. (Something about two wires of infinite length and 1 newton of force between them.)

As far as the definition, is the sentence, "Although this is the internationally accepted definition, one should realize that it does not actually make sense, either grammatically or mathematically." actually meant seriously. It sounds like a joke (and a good one) so if it is true, it could maybe use some explanation. If it's a joke, I suggest we leave it.65.103.203.34 04:48, 7 February 2006 (UTC)

 * The definition as it stands does not seem to actually define the direction of the current - the force will be in the same direction so long as the currents are parallel rather than anti-parallel, whether the currents are of positive or negative charges. Specifying the conductors to be metallic (electron currents) would seem to give the wrong sign for the direction of conventional (positive-charge) current flow. I can't see any way to fix the definition - it is inherently scalar unless one adds in the electrochemical cell definition of the volt with one terminal defined as positive and the other negative, for example. —Preceding unsigned comment added by Enon (talk • contribs) 23:57, 17 May 2010 (UTC)

Why doesn't somebody add a definition in plain English with an analogy making it simple to understand for us laymen and laywomen who aren't nuclear physicists —Preceding unsigned comment added by 221.132.115.69 (talk) 09:45, 12 March 2009 (UTC)

 * I added an introduction to the definition that explains the general idea of the definition. Is that better? --Jc3s5h (talk) 13:07, 12 March 2009 (UTC)

How can the electric current possibly be taken as a Base unit Quantity? Electric current is a measure of charge movement over time: it is a derived unit. The base property is electric charge with the unit as the coulomb. The Ampere is NOT a base unit, nor is electric current a Base Property. Is this entire article a big joke because it sounds like it. No offence intended. —Preceding unsigned comment added by 120.144.138.98 (talk) 01:58, 15 January 2011 (UTC)

 * Any group of units could be declared base units so long as they will force all the other units to take on particlular definitions, and not create any contradictions. Which ones to choose would depend on being able to do experiments to realize the units with as little interaction among the definitons as possible, given the available technology. Jc3s5h (talk) 02:16, 15 January 2011 (UTC)

 * I might agree with 120 in that I think a more natural base unit is one of dimension electric charge and derive the unit of current from that and from the unit time. But in fact, in the SI system, the ampere is defined first without a reference to time (except in the mechanical quantities).  The ampere is the amount of current flowing to get to a certain force per unit length.  The from that current and from the second, a unit charge is defined.  So it is the base unit from which other electrical units are derived.  But I would think it more natural to define base units in time, length, mass, and charge.  Although I know why the mole and candela are defined as base units, I really believe they are superfluous.  But I cannot deny their status as base units in SI. 71.169.180.190 (talk) 04:54, 15 January 2011 (UTC)

22:24, 11 March 2014 (UTC)Folks, I believe that changing the image of the "Definition" to point the currents 180 degrees one of the other, or the vector forces as repulsion forces instead of attraction vectors, or both images could improve comprehension. This is not important for the definition as it is, but could easy the beginner´s learning process. — Preceding unsigned comment added by Hebert Peró (talk • contribs)

I need more context please, to learn about this subject
I appreciate knowing the technical information about how amperes can be exactly defined. But, it doesn't help me with what I came here to learn. The fact that something has a way in which it is exactly measured doesn't tell me a thing about how the thing is experienced in the real world.

It's like saying a clock second or minute is defined as a certain amount of radiation from caesium-133. A unit of time is something we experience in a certain way in our world, daily. How much can you think in a second or a minute? how much can you speak in that amount of time? How wet will you get in the rain in a minute?

I need to have an explanation about these scientific issues which relates to the context in which they are used and experienced.

What is an ampere? How is that measurement used in electrical circuits? Is an ampere a measurement of how much potential energy is there, or how much kinetic energy is there? To use a syllogism, is an ampere like the bulk of water flowing down a river past any given juncture in it - or is an ampere like the force that water has when it hits the same rock before falling over the waterfall? Rainbird 17:59, 17 August 2005 (UTC)

 * ____________________
 * The definitions do exactly what you ask: relate the unit to a physical phenomenon reproducible in a laboratory. You cannot define the second in human terms because all the measurements you mention are inherently very variable. Rain is not a universally steady phenomenon, for example.
 * (By the way, the unit of time is defined by the frequency of the radiation of a particular transition of Cs-133, not by the amount of radiation, which would be a measurement of energy)
 * Getting back to the ampere, it is a quantity of electric charge per unit of time, so the hydraulic analogue would be the quantity of water flowing by per unit of time (cubic metres per second, for example). The force necessary to push the water through depends on the resistance opposed by the river's bed; the electric analogue is electric resistance, and the force required the voltage. These three quantities are related to each other through Ohm's law.
 * Urhixidur 01:34, 2005 August 18 (UTC)

 * ____________________

 * Well... thank you for your comments, Urhixidur. I very much appreciate you taking a moment to explain this to me. Now, you talk about electricity requiring a force to push itself through a circuit. That would be a different stuff than the force which electricity itself, exerts, when it does it's work. Right? Another thing which I've always been curious about, is that an ampere seems to be something of a relative measurement. An ampere of electrical current would be a different amount, if you are working with 1.5volts of direct current, than if you were working of 115volts of alternating current. Is this correct?

 * You say the only definition needed here, is one framed up in terms of how the thing exactly can be scientifically calculated. Wikipedia is resource used by the general public, and not only by scientists who work in laboratories. I would say that there is more context needed. Everything in the world around us interacts with everything else. There are always larger contexts to put our observations into. And when we look at the larger picture, we gain a more comprehensive understanding of everything which is involved. For instance, I would like to see this article expanded, in a way which illustrates exactly how electricians, makers of computer equipment, and other technicians think and relate to the idea of amperes. For contrast, it should also be explained where they use measurements of watts, resistance, and voltage. Thus, I still insist that an ampere is a thing, which needs to be described in terms of how it is experienced in the real world; and we shouldn't be content with only a brief description of how it can be exactly measured. Rainbird 21:09, 20 August 2005 (UTC)

 * ____________________

 * « ... electricity requiring a force to push itself through a circuit. That would be different from the force which electricity itself, exerts, when it does its work. Right? »
 * Nope. Same force. The easiest way (and most frequently used) to get electricity to do work for you is to have it heat stuff (stove tops, space heaters) or give off light (light bulbs). The electricity is forced through a resisting medium, and the resulting energy deposited in the medium radiates away as heat or light (a light bulb works because of a filament heated to white-heat, so its the same mechanism at work).
 * « ... An ampere of electrical current would be a different amount, if you are working with 1.5 volts of direct current, than if you were working of 115 volts of alternating current. Is this correct? »
 * Essentially yes. An ampere at low voltage is not the same as an ampere at high voltage. The water analogy would be a litre of water at low pressure versus a litre of water at high pressure. More energy in the latter. For direct current, the power (energy per unit of time) is equal to the voltage times the amperage (with alternating current, it's also true but there is a constant that has to be factored in to account for the time-varying voltage).
 * For the context you ask for, you are right in a way, but it is not the Ampere article's place; try the more general articles dealing with eletrical theory. Because you cannot compare amperages beyond saying that they represent varying quantities of electric charge per unit of time without specifying the other key factors: the resistance and voltage involved. A lightning bolt delivers a huge amperage (30 to 300 kiloamperes) but over a very short time. About the only other human-scale titbit I can dredge up at this juncture is this one: it's not the voltage of an electric shock that stops your heart (static elctricity sparks you generate by rubbing your feet on carpet is in the kilovolts range, but it can't kill you), its the amperage. It takes about 2 amperes to stop a heart from beating.
 * Urhixidur 03:09, 2005 August 21 (UTC)

 * ____________________
 * All I see here, in what you say, is that you have a rubber ruler which you're working with. You explain that an ampere, figuratively speaking, is a measurement of volume, which does not indicate the same amount of volume, every time you use the term.

 * So, is the concept that voltage is a way of compressing energy? Somehow, you're able to have more electricity in any given length of that wire. This would mean it has more potential to spring back, and release the energy which was given to it, originally.

 * I can tell that you are a person who is fond of mathematics, and of theories which have to do with what mathematics can tell us about something.

 * I have to again insist, however, that there is a need for the general public to learn what these concepts mean. If you explain amperes with the language of mathematics, only, you have not communicated the definition of that concept to the ears of the public with symbols which they have in their language.

 * post script - I see that you are fleshing the article out a bit with the electrical safety issue. Good idea. I think the most common place people see the term "ampere" is on fuses in a fuse box.--Rainbird 06:37, 21 August 2005 (UTC)

 * You're reading me wrong (my mistake in writing just "litre" earlier, when I meant "litre per second"). The hydraulic analogue of amperage is not volume, it is flow rate, that is to say, volume per unit of time. And there is no fluctuation: an ampere is an ampere is an ampere. It's just that amperage, by itself, is not enough to describe unambiguously an electrical phenomenon. Going back to the unavoidable hydraulic analogy, a flow of x litres per second is an incomplete description: that flow going through a one-inch square aperture is under a lot more pressure than the same flow spread over a frontage of one kilometre (and even then one would need to specify the height of the water front to gauge its speed and pressure).
 * Voltage, in its turn, is not a way of "compressing" energy, it is a measure of the energy associated with the electricity. Specifically, a volt is a joule per coulomb, so it designates a very specific amount of energy attached to each unit of electric charge. Thinking in terms of the "amount of electricity" in a wire is misleading, but the analogy between a loaded spring and the voltage of an electrical supply is not a bad one.
 * Urhixidur 17:26, 2005 August 21 (UTC)

Why is the letter "I" used in the mathematical formula?
I understand that C is used for specific heat so we couldn't use it for current. But is there a relationship between current and the letter "I"? Is it latin? thanks for help
 * I've read *somewhere* that "I" was chosen since it stood for "Intensity". As a consequence, electrical engineers use "j" where mathematicians use "i" for the imaginary unit. With only 26 letters, overloading will occur, which is why advanced mathematicians must know English, Greek, Hebrew and other alphabets. ( Oh, and you can sign your posts with --~, or use the signature button in the default editor.) --Wtshymanski 20:44, 29 September 2005 (UTC)

 * Indeed, it's explained in the electric current article. --Mudd1 (talk) 01:07, 19 January 2014 (UTC)

erroneous definition for Ampere.
just to let you know that i corrected a serious error "Alternate exact definition" that you made to the SI definition of the unit of electric current, Ampere. it's amazing that this error was left uncorrected for more than 18 months. in an article about objective physical convention, please be careful with applying words like "definition" and "exactly". do not apply those terms to things that are neither definitions nor exact. Rbj 01:04, 4 May 2006 (UTC)

 * I love a good argument. Considering:
 * 1) CIPM, 1988, Recommendation 2 (PV, 56, 45 and Metrologia, 1989, 26, 70) recommends « that 25 812.807 W exactly be adopted as a conventional value, denoted by RK-90, for the von Klitzing constant, RK ».
 * 2) CIPM, 1988, Recommendation 1 (PV, 56, 44 and Metrologia, 1989, 26, 69) recommends « that 483 597.9 GHz/V exactly be adopted as a conventional value, denoted by KJ-90 for the Josephson constant, KJ ».
 * 3) Since KJ = 2he and RK = 1/he², we have e = 2/(RKKJ)
 * 4) Hence the exact value quoted originally (defining the Ampere-second in terms of 1/e = RKKJ with no loss of precision).
 * It should be understood, however, that this exact value is not endorsed by the CIPM, which was careful to state that « Recommendations 1 (CI-1988) and 2 (CI-1988) do not constitute a redefinition of Sl units. The conventional values KJ-90 and RK-90 cannot be used as bases for defining the volt and the ohm (meaning the present units of electromotive force and electrical resistance in the Système International d’Unités (SI)). To do so would change the status of µ0 from that of a constant having an exactly defined value (and would therefore abrogate the definition of the ampere) and would also produce electrical units which would be incompatible with the definition of the kilogram and units derived from it. »
 * This "contradiction" holds true only if one keeps the original definition of the ampere, which is why I presented this as an alternate definition. So, you are right in saying it is not a definition --not an official one--, but you are wrong in claiming the value is not exact.
 * Urhixidur 02:34, 4 May 2006 (UTC)

 * baloney. the value is not exact because we do not know exactly what the elementary charge, measured in ampere-seconds is.  the SI unite called the "ampere" is defined in such a way that the permeability constant is exactly 4 π x 10-7 (in SI units), the ampere together with the definition of the second are combined to define the SI unit of charge, the coulomb.  all of these definitions are made without any reference to the elementary charge.  the elementary charge plays no role in defining the Ampere nor the Coulomb.  given these definitions, then physicists go about to measure the elementary charge and that is published along with their degree of uncertainty.  Rbj 03:55, 5 May 2006 (UTC)

 * You're missing the point. The value is exact because there are no missing decimals. This has nothing to do with whether the value is correct or not. Urhixidur 16:26, 5 May 2006 (UTC)

 * no, Urhixidur, you missed the point. the values you give for RK-90 KJ-90 are neither exactly the values you state, nor are they exactly known, given how units like the kilogram and ampere are defined.  the result, that the elementary charge comes out to be the reciprocal of exactly 6.241 509 629 152 65 in coulombs, is misleading.  it implies that the elementary charge is exactly known (and it's a little off from known values). Rbj 17:28, 5 May 2006 (UTC)

 * i made another fix. Urhixidur, we don't put "definitions" into Wikipedia that are not official definitions.  or, at the very least, definitions that are not logically and substantively equivalent to the official definitions.  take a look at the kilogram page.  they put in these other proposed definitions in another section.  if the proposed definition gets adopted by the "governing bodies", whoever they are, then Wikipedia's definition should be changed.  not until then.

 * Nicely done. Urhixidur 16:26, 5 May 2006 (UTC)

 * BTW, your conventional values for RK-90 KJ-90 do not agree exactly to the current 2002 CODATA values. One is even outside the standard uncertainty.  So, now that they have newer revised values for those constants, I highly doubt that even if they adopt this proposed definition for the kilogram that the result of the defined value for the elementary charge will come out to be the reciprocal of exactly 6.241 509 629 152 65 in coulombs.  By the currently accepted values for RK-90 KJ-90, that's already too far off. Rbj 04:49, 5 May 2006 (UTC)

 * Hey, it's not my convention, it is the CIPM's. SI has been moving steadily towards pinning the unit definitions to universal, natural phenomena. Taking the second as a starting point, the speed of light ties it to the metre. This leaves two degrees of freedom: the ampere and the kilogram. If the Josephson and von Klitzing constants (RK-90 and KJ-90) are used, this pins the ampere, and one can preserve the permeability constant by finally defining the kilogram from the force between conductors (as detailed in the kg article). Of course, as the CODATA values make clear, the CIPM conventional values are definitely off, which is another way of saying the "new" ampere and kilogram would be substantially different from their current values. No doubt this is in part what has prevented (and likely will continue to prevent) the new potential definitions from being adopted. The key point to realise is that the definitions of the ampere and the kilogram should go hand in hand, and that nobody disputes that the current kilogram (defined by an arbitrary lump of metal alloy) is a bad choice. Urhixidur 16:26, 5 May 2006 (UTC)

 * i dunno why you appeal to an 18 year old convention that conflicts with the harmonized 4 year old measurement, that was in fact not adopted an the SI definition, for anything. it's dumb.  those values for RK-90 and KJ-90 are not accurate.  they have revised values for that today and those revised values do not agree with your values.
 * really what you're talking about is a redefinition of the kilogram in such a way that preserving the permeablity, μ0 to what it is, will also fix the value of the elementary charge e, to an exact value. but there are two mistakes that you are making.  first, they might redefine the kg to fix Planck's constant, h, to an exact value instead (instead of choosing to fix e).  i think that is more likely after reading papers from Peter Mohr and Barry Taylor. second, if they change the definition of the kg away from the Paris prototype so such that fixes either h or e, they will do it in such a way so that at the time of the change of definition, there will be no change in the numerical value of the constant they're fixing.  as measurements are improved or revised, then the mass of a kilogram (more precise what we believe it to be) will drift away from the mass of the prototype, but the fixed constant will remain.  but since we already have a newer and different value for e, given our present base unit definitions, there's less than an ice cube's chance in hell that they will ever redefine a Coulomb to be precisely 6.241 509 629 152 65 elementary charges.  that number is crap.  it is already outside the std. uncertainty of the known value of e.  but in any case, it ain't the definition and to say it is, is misleading. Rbj 17:28, 5 May 2006 (UTC)

okay, Urhixidur, i believe and hope that i came to a revision that is substantively accurate and is acceptable to you. if and when the kg gets redefined in such a manner as to set the elementary charge to be virtually e = 1.602176491612271 C, then your alternative definition of the ampere will be functionally equivalent to the present definition. since they haven't yet done that (and they might not, i would be rooting for them to define the kg to fix h instead), the alternative definition is not functionally equivalent to the official definition, so it isn't yet a definition, but is a proposed definition. actually, since the definition of the ampere need not change from its present definition fixing μ0 = 4 π H/m, this redefinition of the kg does not change the definition of the ampere, but creates a functionally equivalent alternate definition (that is not in force, presently). i hope these last changes to the ampere and kilogram article meet with your approval. Rbj 01:03, 7 May 2006 (UTC)

 * Seems that the current (ha ha) proposal is for e=$1.602 C$.

 * Looks good enough for now. I would also like to see a discussion (maybe in the metrology article, but more likely in the SI article) of degrees of freedom of the system of units, and of the continuing drive to tie each unit to known physical phenomenon. It would tie in nicely with the similar discussion already extant about the differences between the CGS esu and emu systems.
 * Don't think I'm pushing for KJ-90 and RK-90 to become enshrined (like c already is). They're too obscure —compared to Planck's constant, for one.
 * Urhixidur 02:02, 30 May 2006 (UTC)

RK-90 is just a conventional value. It cant be made exact by redefining the kilogram because the von Klitzing constant equals half the speed of light times the magnetic permeability of free space divided by the fine-structure constant. The speed of light and the permeability of free space are already defined as 299792458 m/s and 4π/10^7 N/A^2 respectively, so we'd need to know the exact value of the fine structure constant to do that. --Army1987 09:33, 2 August 2006 (UTC)
 * I agree with Army here. Even though the elementary charge can be defined to an exact value (which would result in a valid alternative definition of the Ampere to be a specified number of elementary charges per second passing a boundary) by redefining the kilogram, that doesn't mean it would do it by redefining RK and KJ, but just e. However, I still think it's more likely that they'll redefine the kg to set Planck's constant to a defined value instead. Perhaps we should take out all of the talk of RK-90 and KJ-90 in the alternative definition. r b-j 19:56, 2 August 2006 (UTC)

 * It's six of one, half a dozen of the other; of h, KJ, RK, and α, you need only pick any two (remember that µ0 ≡ 4π N/A²):

 * You can also express e in terms of any pair of the others (except RK and α): e = (h/RK)1/2 = h·KJ/2 = 2·h·α/µ0·c = 2/RK·KJ = 4·α/µ0·c·KJ
 * --Urhixidur 14:58, 7 August 2006 (UTC)

 * just because there are expressions of RK in terms of h/e² or 2/e·KJ, it doesn't matter.  µ0 and c are defined and α is a primary measurement (being that it is dimensionless and we actually measure dimensionless values).  so even it it appears you can define RK to be some conventional constant (by redefining the kg to set h and e to some values or to set e and KJ), you can't.  if the conventional value for RK puts it outside µ0·c/2·α and α is the only measured quantity and is outside of the standard uncertainty of the what you would get for α resulting from that conventional RK, the that conventional value just cannot be right, given the present state of knowledge.  r b-j 17:37, 7 August 2006 (UTC)

 * The statement is correct but confusing. It can be defined as stated, but currently isn't defined that way. In many standards, some words have specific meanings, such as shall.  Others don't, even if they would in English. One result is that may and may not are synonyms. Gah4 (talk) 05:20, 27 April 2018 (UTC)

Ok, experts - but what is an Ampere?
How does a layman judge amps as a unit of electricity? How can the term be understood by layman? Ill give you an example from an article about diesel-electric locomotives: ''This 270,000-pound (122,470-kg) locomotive is designed to tow passenger-train cars at speeds of up to 110 miles per hour (177 kph). The diesel engine makes 3,200 horsepower, and the generator can turn this into almost 4,700 amps of electrical current. The four drive motors use this electricity to generate over 64,000 pounds of thrust.''

Now, what in the blazes does this term 4,700 amps of electrical current mean? I usually hear of the term "kilowatt". If a reader can't figure it out from the article, it's useless. (The same article goes on to measure another generator as producing kw.)Scott Adler 08:16, 6 August 2006 (UTC)

 * if the reference to amps in that other article is uninformative, take it out. but the definition here is, i think, physically explicit.  amperes is a measure of electric current, how rapidly electrical charge is moving past a boundary of some sort.  it is precisely a Coulomb per second, but the ampere is defined first (from this setup with parallel wires and magnetic force) and then the coulomb is defined to be the charge that passes, in 1 second, a boundary of which a 1 ampere is flowing. r b-j 02:54, 7 August 2006 (UTC)

 * Without specifying the voltage, the amperage figure is useless. --Urhixidur 14:13, 7 August 2006 (UTC)

 * the ampere figure is useful for telling one how fat the conductors have to be. (the voltage would be useful to determine how much insulation they need on those conductors.) r b-j 17:39, 7 August 2006 (UTC)

Hebert Peró (talk) 22:09, 11 March 2014 (UTC)Just to help clarify, the person who referred to Amps in that locomotive knew that an engineer could make the connection of power and current, so (s)he gave the power in hp and current in amps. The missing number is the efficiency of the generator, but it is a precision number that does not matter in that context. Anyway, in a machine of that power, one could use η of 98% and be very close to the real number. So I judge it adequate, because it is not a definition, but simply an illustration. If it is a consensus, I can revise it.

multiples
Please don't remove multiples, for consistency they are in all seven base SI units.

Definition, Again
The definition is inconsistent. At one point the article says at an ampere is the "amount" of charge, and later it says that an ampere has nothing to do with quantity. This is patently inconsistent. PLEASE CHANGE IMMEDIATELY. 76.24.28.237 00:23, 1 September 2007 (UTC)

 * You need to distinguish between the definition and the relationship to charge. The definition is not in terms of charge, but in terms of forces, lengths, and such already defined base units.  Charge is defined later as a derived unit.  This is not so intuitive, but is the way the SI system is built up.  An ampere is indeed an amount of charge displaced per second, but that's not how it is defined.  It's not inconsistent. AND WHAT'S THE RUSH? Dicklyon 00:31, 1 September 2007 (UTC)

 * I re-ordered the section to make it more clear. I hope you find it less contradictory. Dicklyon 00:40, 1 September 2007 (UTC)

Was Ampere originally a unit of charge? This quote seems to say so

"Readers of my paper are requested to bear in mind that it was written so long ago that the Ampere was still understood to mean the electromagnetic unit quantity of electricity of the Ohm series. The term is now always applied to the unit current."

- George Johnstone Stoney, 1894 — Omegatron 18:09, 9 September 2007 (UTC)

What is CA?
This spec sheet: http://www.thunder-sky.com/pdf/200725164258.pdf, talks about current in unit of CA. What is CA? Thanks, Daniel.Cardenas 14:46, 4 October 2007 (UTC)

 * In the battery charging rate 3CA, the A is for Amps and the C is for capacity, made nondimensional. If you have a 1 AmpHour battery, C is 1, and you can charge it at 3 A.  Usually the A is omitted and his is referred to as a 3C charge rate, meaning you can charge the battery in not much more than 1/3 hour. Dicklyon 18:38, 4 October 2007 (UTC)

Its a 40 AmpHour battery. Does this mean C is 40 and you can charge it a max of 120 amps? I'm wondering if this kind of information should go into the main article. I don't see how. Thanks! Daniel.Cardenas 23:10, 4 October 2007 (UTC)

 * Yes that's what it means; no it doesn't belong in the Ampere article. Dicklyon 23:46, 4 October 2007 (UTC)

Plugs in India
What is the difference between a 5 amp plug and a 16 amp plug and for which different electrical appliances these are used. Vivek. —Preceding unsigned comment added by 124.253.3.21 (talk) 06:23, 30 April 2008 (UTC)

 * I have put a title on this section, based on the IP address 124.253.3.21 being in India. Perhaps someone familiar with electric power in India can answer. --Gerry Ashton (talk) 13:28, 30 April 2008 (UTC)

What is a parameter?
what is aparameter —Preceding unsigned comment added by 196.0.25.118 (talk) 16:07, 27 May 2008 (UTC)

 * The word "parameter" does not appear in the article, nor on this talk page; where did you see the word? One meaning is an argument to a mathematical function. --Gerry Ashton (talk) 16:12, 27 May 2008 (UTC)

why 2*10^–7?
Why not, you know... 1 newton? --Random832 (contribs) 16:42, 16 June 2008 (UTC)

 * In the article, under External links, there is a web page, A short history of the SI units in electricity. That gives a good explaination.

 * My summary of that external link is that the 2 comes from the fact that there are two wires carrying equal current, and the 10-7 is an scale factor that makes the magnitude of the ampere convenient. In particular, this value allows all the electrical and mechanical laws to be consistent; for example, one ampere flowing through one ohm for one second is one joule of energy, also, it requires one joule of energy to move an object a distance of one meter against a force of one newton. --Gerry Ashton (talk) 17:43, 16 June 2008 (UTC)
 * Right, but an ohm would be a smaller unit if the ampere were larger, so it would still be consistent. And, yeah, this makes the ampere and ohm convenient, but the farad isn't - if the ampere were a larger unit (get rid of the 10^7 and the amp we'd have would be 10^3.5 or ~3162 of what we now call amps), we'd be used to talking in microamps where we use milliamps now. (of course, the farad would be even bigger than it is now) - but mostly I was wondering why 10^-7 and not 10^-6 or 10^-8 - based on that link, though, it looks like the 10^-7 has its origins in the CGS system --Random832 (contribs) 19:36, 16 June 2008 (UTC)

 * It has its origins in the value of muo in the equation for the force between two current carrying wires. Check out the article on Ampere's Force Law - pretty good explanation there. PhySusie (talk) 00:21, 17 June 2008 (UTC)
 * You're confusing cause and effect - μ0 has its value because the ampere was set to the size it was, not the reverse. --Random832 (contribs) 02:11, 17 June 2008 (UTC)
 * There is no cause and effect -- the ampere was defined from use of an equation that, when solved for current, will depend on the specific value of μ0 existing already. So simultaneously we get the size of the ampere and and we get the specific defined value of μ0 that is considered as a fixed value in the SI system, not subject to refinement by experiment.  At the time I write, there is the proposal to make the elementary charge value fixed instead and defining the ampere in terms of that, which would then make μ0 become unfixed and then subject to refinement. (Also about the below comment, the prior use of cm and such doesn't matter -- the ampere was sized for convenience regardless.) Nicknicknickandnick (talk) 05:03, 27 April 2018 (UTC)
 * A simple answer to the original poster's question: 2 is probably because there are two wires (as mentioned above). 10^-7 is because they originally did these experiments measuring in centimetres and grams. So force was measured in dynes = g cm s^-2 (as opposed to newtons = kg m s^-2) and the distance between the wires in cm (as opposed to m) gives you a factor of 1000 x 100 x 100 = 10^7 (from the kg, and cm twice). 132.165.76.2 (talk) 12:54, 13 April 2011 (UTC)

 * The 2 comes from Ampère%27s force law, which comes from the integrals in the Biot-Savart law. The power of 10 to make a nice sized unit. Gah4 (talk) 05:32, 27 April 2018 (UTC)

What is a Yottampere?
Enquiring minds want to know. This page is the target for redirection from "Yottampere" yet there is no mention of what a Yottampere is on this page. I'd add it myself but I don't know what it is.220.237.63.219 (talk) 06:21, 2 September 2008 (UTC)

A yottaampere is the combination of the SI prefix yotta- with the unit ampere, and means 1024 amperes, or 1,000,000,000,000,000,000,000,000 amperes. If the entire output power of the sun were converted to electicity at a voltage of 120 volts (used for household lights and small appliances in North America) the current would be about 3 yottaamperes (see the yotta- article).--Gerry Ashton (talk) 15:39, 2 September 2008 (UTC)

Dubious
The dubious numbers in this article appear to come from a fake quote, one nowhere to be found in the cited source. Gene Nygaard (talk) 17:34, 23 December 2008 (UTC)
 * I've removed the dubious numbers, and revised the "Proposed future definition" section to be more in line with what's in the cited sources, so hopefully this issue is now fixed. Djr32 (talk) 19:25, 8 March 2009 (UTC)

ampere
If I am giving 500 'A', what voltage should i maintain and how. Please even show me the calculation on how should I keep the track of voltage according to the Amperes.

(122.167.235.238 (talk) 07:04, 4 March 2009 (UTC))

 * What kind of load is the current flowing through? Is the current DC or AC? --Gerry Ashton (talk) 16:29, 4 March 2009 (UTC)

capitalization
The NIST standards for SI units requires that units be lower case unless the unit is based on a human name. E.g. Hertz or Hz is correct. hz is not. See NIST section 6, 6.1.2  Both Amperes and Coulombs must be capitalized.128.95.172.173 (talk) 02:34, 29 October 2010 (UTC)

 * The proceeding paragraph is complete nonsense. Jc3s5h (talk) 03:06, 29 October 2010 (UTC)

 * Indeed.] Do these guys just not know whatever the hell they be talking about (yet insist on presenting themselves as expert) or are they deliberately trying to screw things up? 70.109.176.87 (talk) 03:45, 29 October 2010 (UTC)

The source cited on in the above discussion by 128.95.172.173, NIST Special Publication 811, states "'Unit symbols are printed in lower-case letters except that:" "(a) the symbol or the first letter of the symbol is an upper-case letter when the name of the unit is derived from the name of a person;"

A different section, section 9 ,Rules and Style Conventions for Spelling Unit Names, states When spelled out in full, unit names are treated like ordinary English nouns. Thus the names of all units start with a lower-case letter, except at the beginning of a sentence or in capitalized material such as a title.

Emphasis has been added to the preceding quotations.Jc3s5h (talk) 13:06, 29 October 2010 (UTC)

 * Don't stop the quote there. The very next sentence is: "In keeping with this rule, the correct spelling of the name of the unit °C is “degree Celsius” (the unit “degree” begins with a lowercase “d” and the modifier “Celsius” begins with an uppercase “C” because it is the name of a person)."188.192.109.185 (talk) 15:25, 6 December 2012 (UTC)

Examples
Interesting additions: Examples of how many amps various common appliances draw, what ratings are common on fuses and circuit breakers around the world, whether they are different for 120V or 240V countries, etc. -- Beland (talk) 02:46, 24 January 2011 (UTC)
 * I have added a section "Everyday examples". Does this section have the correct structure? If so, I will collect some references for the various statement made.  Also, should we restrict ourselves to everyday examples, or should we look at industrial systems? In either respect, the list should be kept short. Martinvl (talk) 14:10, 25 January 2011 (UTC)
 * That structure is fine, though as we fill it out it would be helpful to have apples-to-apples comparisons for the U.S. vs. Europe. Thanks for your work on this! -- Beland (talk) 18:40, 25 January 2011 (UTC)

The European examples are based on the usual false premise. There is practically nowhere in Europe that has a 230 volt mains supply. Most of Europe is still 220 volts and the UK is still 240 volts and there is (at present) no intention of changing this. All that has happened is that the whole of Europe has been made nominally 230 volts with a voltage tolerance (± 10%) that encompases both the 220 volt areas and the 240 volt areas (and also the few 250 volt areas that remain in the UK). Most European domestic appliances are specified to run from 230 ± 10% volts and will thus operate anywhere in Europe. The most notable exception is filament light bulbs which are manufactured only in 220 and 240 volt versions for their respective markets. 86.159.159.194 (talk) 12:10, 7 November 2012 (UTC)

"nowhere in Europe that has a 230 volt ...?" Not true. Germany, Switzerland, Austria and the Czech Republic is where I measured 230 V (± 5 Volts) most of the time. Own research... Even the light bulbs are frequently made for 230 V, meaning they deliver the specified power at this voltage. Of course they will work within ± 10%, only the light output and life expectancy is affected.

I think we should make this section "Examples" or "Examples of Amperage" and include some higher amps like the current flow in the plasma of tokamak reactors ~ 3 million amps. --JohnTsams (talk) 21:31, 29 July 2013 (UTC)

 * Yes only life and light output change, but by large enough factors that the difference is significant. In the US, it is common to use 130V lamps in industrial environments where lamp changing cost is large enough to shift the optimum, compared to 120V for home use. I suspect in 220V countries, 240V lamps could be used the same way. You would not want to use 220V lamps at 240V for normal use. The efficiency of induction motors can be significantly different. Switching power supplies for electrical equipment can run over a wide voltage range. Gah4 (talk) 05:40, 27 April 2018 (UTC)

Charge passing a point, per unit time
Physicists definition would refer to charge penetrating a Gaussian surface per unit time, not passing a point. Only in one-dimensional conductors would current be the charge rate passing a point. I've added "passing a point in a circuit," although there might be a better resolution somewhere between a physicist's version and a non-scientific version. 128.95.172.173 (talk) 02:41, 1 June 2011 (UTC)

 * How about something to the effect, "passing through a cross-section of a conductor"? Such terminology informally describes a surface that (effectively) completely traverses the path of all the charge carriers, is compatible with the Gaussian surface concept, and neatly allows for the fact that nearly all charge carriers travel on the surface of conductors (see Hall Effect).  Also, (based on my experience as an EE) this kind of phrase is commonly used in texts that address basic electric theory. --69.255.17.51 (talk) 19:19, 5 June 2011 (UTC)

 * I have reworded the lede, removing one of the occurences of the word "point". The other occurence is qualified as being a "point of an electric circuit".  I am not convinced that all currents travel on the surface of conductors - what are the mechanics of current conduction in lightning or in plasmas.  (This is not a rhetorical questions - I do not know). Martinvl (talk) 20:28, 5 June 2011 (UTC)

Revocation of 19 November 2011
Please discuss these changes at Wikipedia talk:WikiProject Measurement. Martinvl (talk) 18:26, 19 November 2011 (UTC)

Revocations of 3 October 2012
I reverted recent changes made by User:Hgrosser on 3 October 2012. The reasoning was:
 * (S)He removed a number of "hard" spaces in the text. It is usual to include a "hard" space  when writing something like "3 A" as this ensures that there is no line break between the "3" and the "A".  This is in accordance with WP:MOSNUM and also international standards.
 * I reinstated the the original values of current drawn by various domestic appliances. I notice that Hgrosser appears to be American - I am British and I was writing about European appliances.  I took the values from appliances around my own home.  BTW, in the UK, an "Immersion heater" is an electical hot water supply.  The type of immersion heater shown in the picture in Wikipedia is illegal in the UK as it is regarded as a fire risk. Martinvl (talk) 06:06, 3 October 2012 (UTC)
 * That would be original research then. There is no European mains supply at 230 volts (see above).  What makes you think that the type of immersion heater illustrated is illegal in the UK?  I can buy one in almost any hardware or electrical supplier. In any case: so what?  It is an immersion heater and that is what that article is about.  86.159.159.194 (talk) 12:18, 7 November 2012 (UTC)

Popular Use of the Term Ampere
Hebert Peró (talk) 23:17, 11 March 2014 (UTC) Maybe we could create this section to clarify the use of Amp as a "Power-like" unit. Something like:

It is common the misuse of Ampere to refer to power, instead of current.

The main reason is the tendency of the standardization of the voltages in general. As Power (watt) is the product of Voltage (Volts) and Current (Amps), and the voltage is standardized in an application, the current becomes indication of power.

For example, cars use 12 Volt batteries, but the advertisement may say: "10 Amps more power than...". If the voltage is fixed in 12 volts, then a battery with 10 Amps more, means that it has 120 watts more power than others.

The same occur with home appliances, industry components etc. The idea is that you can easily calculate the real number by the information given, i.e. calculate watts using Amps.

As an illustration, think about asking the seller, in a car battery store, for a 12 Volt battery. S(he) will ask immediately: "how many Amps?" or, understanding that the question is really "As I need a new battery, and I don´t know it, can you sell me the correct one for my car?", s(he) will ask: "what is your car model and year?", and look up the "Amps" in a catalog.

 * This is tricky. Vacuum cleaners are commonly advertised in amps, but given the power factor for inductive loads, that isn't very useful. Gah4 (talk) 05:43, 27 April 2018 (UTC)

Ouch
What blithering crap. Leave physics to physicists. An amp is a couloumb per second. DOne, — Preceding unsigned comment added by 165.201.140.130 (talk) 20:13, 13 May 2014 (UTC)

And what then is a coulomb? — Preceding unsigned comment added by 94.196.243.2 (talk) 11:42, 13 March 2016 (UTC)

Batteries
All batteries I know of are rated in Amp-hours (big ones) or mA H (small ones), not in C or mC. The article suggests that they are in C. Gah4 (talk) 14:20, 25 October 2015 (UTC)

Definition section
The definition really should point out that (a) the current definition also fixes the value of the permeability of free space, and (b) in effect, the current definition in effect defines the Amp by defining the permeability of free space as a fixed value (the theoretical experiment involving parallel wires really just being a rather convoluted way of getting permeability involved) — Preceding unsigned comment added by 94.196.243.2 (talk) 11:45, 13 March 2016 (UTC)

NEC and typical currents
I had thought that the US NEC limited the current for usual (type A) plugs from 15A outlets to 12A. I was going to change the values, but it seems that there are 1800W (15A) toasters. I believe it is 12A for hair dryers, though. You can watch them get closer, and finally reaching 1440W. I don't have a current NEC to look it up. Gah4 (talk) 08:48, 1 April 2016 (UTC)

This page is very out of date because of the redefinition
How should we fix it?

 * Actually it's hard to say which is worse, the fact that the new definition makes the page out of date, or the wording of the new definition itself, which contains undefined terms like A and ∆ν. (The latter refers to the unperturbed ground-state hyperfine transition frequency of the caesium-133 atom, namely 9192631770 Hz, but a casual reader of this Wikipedia article might not immediately recognize it as such.)  In my case I came to this article because I needed the exact definition of the ampere, which I had to go elsewhere to find since this clearly was not it.
 * Since elementary charge (that of a proton) is so fundamental, I don't understand why the coulomb was not defined as a certain number of elementary charges and an ampere as one coulomb per second. All I can think is that the electronvolt should be a certain number of joules, namely $$1.602176634\times10^{-19}$$ joules exactly, and that this relationship for some reason takes precedence over the number of electrons in a coulomb.  Had the latter been used it would have been natural to make it an integer, as with the Avogadro number.  In fact the reciprocal, 6241509074460762607.77624098... is not quite an integer, falling short by about 9/40 of an electron, .223759... to be more precise.  Vaughan Pratt (talk) 19:21, 11 July 2019 (UTC)

 * The new definitions are all in 2019_redefinition_of_the_SI_base_units. It doesn't explain the reasoning behind the definition of the charge of the electron, though. Some are to make the uncertainties come out small enough, and in the right places.  I was wondering not so long ago, why Avogadro's number was not a multiple of 12, such that an integer number of C-12 atoms would be in a gram.  Again, I didn't try to follow the math. Since coul/electron is used in calculations more often that electrons/coul, maybe that is the reason. Gah4 (talk) 21:37, 11 July 2019 (UTC)

Change the title to "Ampere (unit)"?
To improve consistency, shouldn't the title be "Ampere (unit)"? — Preceding unsigned comment added by Davidhaugs (talk • contribs) 13:01, 6 February 2021 (UTC)

A Commons file used on this page or its Wikidata item has been nominated for deletion
The following Wikimedia Commons file used on this page or its Wikidata item has been nominated for deletion: Participate in the deletion discussion at the. —Community Tech bot (talk) 22:38, 7 January 2022 (UTC)
 * International System of Units Logo.png

title: Talk:Ampere


text:
AWK

AWK is a domain-specific language designed for text processing and typically used as a data extraction and reporting tool. Like sed and grep, it is a filter, and is a standard feature of most Unix-like operating systems.

The AWK language is a data-driven scripting language consisting of a set of actions to be taken against streams of textual data – either run directly on files or used as part of a pipeline – for purposes of extracting or transforming text, such as producing formatted reports. The language extensively uses the string datatype, associative arrays (that is, arrays indexed by key strings), and regular expressions. While AWK has a limited intended application domain and was especially designed to support one-liner programs, the language is Turing-complete, and even the early Bell Labs users of AWK often wrote well-structured large AWK programs.

AWK was created at Bell Labs in the 1970s, and its name is derived from the surnames of its authors: Alfred Aho (author of egrep), Peter Weinberger (who worked on tiny relational databases), and Brian Kernighan. The acronym is pronounced the same as the name of the bird species auk, which is illustrated on the cover of The AWK Programming Language. When written in all lowercase letters, as, it refers to the Unix or Plan 9 program that runs scripts written in the AWK programming language.

History
According to Brian Kernighan, one of the goals of AWK was to have a tool that would easily manipulate both numbers and strings. AWK was also inspired by Marc Rochkind's programming language that was used to search for patterns in input data, and was implemented using yacc.

As one of the early tools to appear in Version 7 Unix, AWK added computational features to a Unix pipeline besides the Bourne shell, the only scripting language available in a standard Unix environment. It is one of the mandatory utilities of the Single UNIX Specification, and is required by the Linux Standard Base specification.

In 1983, AWK was one of several UNIX tools available for Charles River Data Systems' UNOS operating system under Bell Laboratories license.

AWK was significantly revised and expanded in 1985–88, resulting in the GNU AWK implementation written by Paul Rubin, Jay Fenlason, and Richard Stallman, released in 1988. GNU AWK may be the most widely deployed version because it is included with GNU-based Linux packages. GNU AWK has been maintained solely by Arnold Robbins since 1994. Brian Kernighan's nawk (New AWK) source was first released in 1993 unpublicized, and publicly since the late 1990s; many BSD systems use it to avoid the GPL license.

AWK was preceded by sed (1974). Both were designed for text processing. They share the line-oriented, data-driven paradigm, and are particularly suited to writing one-liner programs, due to the implicit main loop and current line variables. The power and terseness of early AWK programs – notably the powerful regular expression handling and conciseness due to implicit variables, which facilitate one-liners – together with the limitations of AWK at the time, were important inspirations for the Perl language (1987). In the 1990s, Perl became very popular, competing with AWK in the niche of Unix text-processing languages.

Structure of AWK programs
"AWK reads the input a line at a time. A line is scanned for each pattern in the program, and for each pattern that matches, the associated action is executed."

An AWK program is a series of pattern action pairs, written as:

where condition is typically an expression and action is a series of commands. The input is split into records, where by default records are separated by newline characters so that the input is split into lines. The program tests each record against each of the conditions in turn, and executes the action for each expression that is true. Either the condition or the action may be omitted. The condition defaults to matching every record. The default action is to print the record. This is the same pattern-action structure as sed.

In addition to a simple AWK expression, such as  or , the condition can be   or   causing the action to be executed before or after all records have been read, or pattern1, pattern2 which matches the range of records starting with a record that matches pattern1 up to and including the record that matches pattern2 before again trying to match against pattern1 on subsequent lines.

In addition to normal arithmetic and logical operators, AWK expressions include the tilde operator,, which matches a regular expression against a string. As handy syntactic sugar, /regexp/ without using the tilde operator matches against the current record; this syntax derives from sed, which in turn inherited it from the ed editor, where   is used for searching. This syntax of using slashes as delimiters for regular expressions was subsequently adopted by Perl and ECMAScript, and is now common. The tilde operator was also adopted by Perl.

Commands
AWK commands are the statements that are substituted for action in the examples above. AWK commands can include function calls, variable assignments, calculations, or any combination thereof. AWK contains built-in support for many functions; many more are provided by the various flavors of AWK. Also, some flavors support the inclusion of dynamically linked libraries, which can also provide more functions.

The print command
The print command is used to output text. The output text is always terminated with a predefined string called the output record separator (ORS) whose default value is a newline. The simplest form of this command is:

 * This displays the contents of the current record. In AWK, records are broken down into fields, and these can be displayed separately:
 * This displays the contents of the current record. In AWK, records are broken down into fields, and these can be displayed separately:

 * Displays the first field of the current record
 * Displays the first field of the current record

 * Displays the first and third fields of the current record, separated by a predefined string called the output field separator (OFS) whose default value is a single space character
 * Displays the first and third fields of the current record, separated by a predefined string called the output field separator (OFS) whose default value is a single space character

Although these fields ($X) may bear resemblance to variables (the $ symbol indicates variables in the usual Unix shells and in Perl), they actually refer to the fields of the current record. A special case, $0, refers to the entire record. In fact, the commands " " and " " are identical in functionality.

The print command can also display the results of calculations and/or function calls:

Output may be sent to a file:

or through a pipe:

Built-in variables
Awk's built-in variables include the field variables: $1, $2, $3, and so on ($0 represents the entire record). They hold the text or values in the individual text-fields in a record.

Other variables include:
 * : Number of Records. Keeps a current count of the number of input records read so far from all data files. It starts at zero, but is never automatically reset to zero.
 * : File Number of Records. Keeps a current count of the number of input records read so far in the current file. This variable is automatically reset to zero each time a new file is started.
 * : Number of Fields. Contains the number of fields in the current input record. The last field in the input record can be designated by $NF, the 2nd-to-last field by $(NF-1), the 3rd-to-last field by $(NF-2), etc.
 * : Contains the name of the current input-file.
 * : Field Separator. Contains the "field separator" used to divide fields in the input record. The default, "white space", allows any sequence of space and tab characters. FS can be reassigned with another character or character sequence to change the field separator.
 * : Record Separator. Stores the current "record separator" character. Since, by default, an input line is the input record, the default record separator character is a "newline".
 * : Output Field Separator. Stores the "output field separator", which separates the fields when Awk prints them. The default is a "space" character.
 * : Output Record Separator. Stores the "output record separator", which separates the output records when Awk prints them. The default is a "newline" character.
 * : Output Format. Stores the format for numeric output. The default format is "%.6g".

Variables and syntax
Variable names can use any of the characters [A-Za-z0-9_], with the exception of language keywords. The operators + - * / represent addition, subtraction, multiplication, and division, respectively. For string concatenation, simply place two variables (or string constants) next to each other. It is optional to use a space in between if string constants are involved, but two variable names placed adjacent to each other require a space in between. Double quotes delimit string constants. Statements need not end with semicolons. Finally, comments can be added to programs by using # as the first character on a line, or behind a command or sequence of commands.

User-defined functions
In a format similar to C, function definitions consist of the keyword, the function name, argument names and the function body. Here is an example of a function.

This statement can be invoked as follows:

Functions can have variables that are in the local scope. The names of these are added to the end of the argument list, though values for these should be omitted when calling the function. It is convention to add some whitespace in the argument list before the local variables, to indicate where the parameters end and the local variables begin.

Hello, World!
Here is the customary "Hello, World!" program written in AWK:

Print lines longer than 80 characters
Print all lines longer than 80 characters. The default action is to print the current line.

Count words
Count words in the input and print the number of lines, words, and characters (like wc):

As there is no pattern for the first line of the program, every line of input matches by default, so the increment actions are executed for every line. is shorthand for.

Sum last word
s is incremented by the numeric value of $NF, which is the last word on the line as defined by AWK's field separator (by default, white-space). NF is the number of fields in the current line, e.g. 4. Since $4 is the value of the fourth field, $NF is the value of the last field in the line regardless of how many fields this line has, or whether it has more or fewer fields than surrounding lines. $ is actually a unary operator with the highest operator precedence. (If the line has no fields, then NF is 0, $0 is the whole line, which in this case is empty apart from possible white-space, and so has the numeric value 0.)

At the end of the input the END pattern matches, so s is printed. However, since there may have been no lines of input at all, in which case no value has ever been assigned to s, it will by default be an empty string. Adding zero to a variable is an AWK idiom for coercing it from a string to a numeric value. (Concatenating an empty string is to coerce from a number to a string, e.g. s "". Note, there's no operator to concatenate strings, they're just placed adjacently.) With the coercion the program prints "0" on an empty input, without it, an empty line is printed.

Match a range of input lines
The action statement prints each line numbered. The printf function emulates the standard C printf and works similarly to the print command described above. The pattern to match, however, works as follows: NR is the number of records, typically lines of input, AWK has so far read, i.e. the current line number, starting at 1 for the first line of input. % is the modulo operator. NR % 4 == 1 is true for the 1st, 5th, 9th, etc., lines of input. Likewise, NR % 4 == 3 is true for the 3rd, 7th, 11th, etc., lines of input. The range pattern is false until the first part matches, on line 1, and then remains true up to and including when the second part matches, on line 3. It then stays false until the first part matches again on line 5.

Thus, the program prints lines 1,2,3, skips line 4, and then 5,6,7, and so on. For each line, it prints the line number (on a 6 character-wide field) and then the line contents. For example, when executed on this input: Rome Florence Milan Naples Turin Venice

The previous program prints: 1 Rome 2 Florence 3 Milan 5 Turin 6 Venice

Printing the initial or the final part of a file
As a special case, when the first part of a range pattern is constantly true, e.g. 1, the range will start at the beginning of the input. Similarly, if the second part is constantly false, e.g. 0, the range will continue until the end of input. For example, prints lines of input from the first line matching the regular expression ^--cut here--$, that is, a line containing only the phrase "--cut here--", to the end.

Calculate word frequencies
Word frequency using associative arrays:

The BEGIN block sets the field separator to any sequence of non-alphabetic characters. Separators can be regular expressions. After that, we get to a bare action, which performs the action on every input line. In this case, for every field on the line, we add one to the number of times that word, first converted to lowercase, appears. Finally, in the END block, we print the words with their frequencies. The line for (i in words) creates a loop that goes through the array words, setting i to each subscript of the array. This is different from most languages, where such a loop goes through each value in the array. The loop thus prints out each word followed by its frequency count. was an addition to the One True awk (see below) made after the book was published.

Match pattern from command line
This program can be represented in several ways. The first one uses the Bourne shell to make a shell script that does everything. It is the shortest of these methods:

The  in the awk command is not protected by single quotes so that the shell does expand the variable but it needs to be put in double quotes to properly handle patterns containing spaces. A pattern by itself in the usual way checks to see if the whole line matches. contains the current filename. awk has no explicit concatenation operator; two adjacent strings concatenate them. expands to the original unchanged input line.

There are alternate ways of writing this. This shell script accesses the environment directly from within awk:

This is a shell script that uses, an array introduced in a newer version of the One True awk after the book was published. The subscript of  is the name of an environment variable; its result is the variable's value. This is like the getenv function in various standard libraries and POSIX. The shell script makes an environment variable  containing the first argument, then drops that argument and has awk look for the pattern in each file.

checks to see if its left operand matches its right operand;  is its inverse. A regular expression is just a string and can be stored in variables.

The next way uses command-line variable assignment, in which an argument to awk can be seen as an assignment to a variable:

Or You can use the -v var=value command line option (e.g. awk -v pattern="$pattern" ...).

Finally, this is written in pure awk, without help from a shell or without the need to know too much about the implementation of the awk script (as the variable assignment on command line one does), but is a bit lengthy:

The  is necessary not only to extract the first argument, but also to prevent it from being interpreted as a filename after the   block ends. , the number of arguments, is always guaranteed to be ≥1, as  is the name of the command that executed the script, most often the string. is the empty string,. initiates a comment that expands to the end of the line.

Note the  block. awk only checks to see if it should read from standard input before it runs the command. This means that awk 'prog' only works because the fact that there are no filenames is only checked before  is run! If you explicitly set  to 1 so that there are no arguments, awk will simply quit because it feels there are no more input files. Therefore, you need to explicitly say to read from standard input with the special filename.

Self-contained AWK scripts
On Unix-like operating systems self-contained AWK scripts can be constructed using the shebang syntax.

For example, a script that sends the content of a given file to standard output may be built by creating a file named  with the following content:

It can be invoked with:

The  tells awk that the argument that follows is the file to read the AWK program from, which is the same flag that is used in sed. Since they are often used for one-liners, both these programs default to executing a program given as a command-line argument, rather than a separate file.

Versions and implementations
AWK was originally written in 1977 and distributed with Version 7 Unix.

In 1985 its authors started expanding the language, most significantly by adding user-defined functions. The language is described in the book The AWK Programming Language, published 1988, and its implementation was made available in releases of UNIX System V. To avoid confusion with the incompatible older version, this version was sometimes called "new awk" or nawk. This implementation was released under a free software license in 1996 and is still maintained by Brian Kernighan (see external links below). Old versions of Unix, such as UNIX/32V, included, which converted AWK to C. Kernighan wrote a program to turn awk into C++; its state is not known.

 * BWK awk, also known as nawk, refers to the version by Brian Kernighan. It has been dubbed the "One True AWK" because of the use of the term in association with the book that originally described the language and the fact that Kernighan was one of the original authors of AWK. FreeBSD refers to this version as one-true-awk. This version also has features not in the book, such as  and   that are explained above; see the FIXES file in the source archive for details. This version is used by, for example, Android, FreeBSD, NetBSD, OpenBSD, macOS, and illumos. Brian Kernighan and Arnold Robbins are the main contributors to a source repository for nawk: https://github.com/onetrueawk/awk.
 * gawk (GNU awk) is another free-software implementation and the only implementation that makes serious progress implementing internationalization and localization and TCP/IP networking. It was written before the original implementation became freely available. It includes its own debugger, and its profiler enables the user to make measured performance enhancements to a script. It also enables the user to extend functionality with shared libraries. Some Linux distributions include gawk as their default AWK implementation. As of version 5.2 (September 2022) gawk includes a persistent memory feature that can remember script-defined variables and functions from one invocation of a script to the next and pass data between unrelated scripts, as described in the Persistent-Memory gawk User Manual: https://www.gnu.org/software/gawk/manual/pm-gawk/.
 * gawk-csv. The CSV extension of gawk provides facilities for handling input and output CSV formatted data.
 * mawk is a very fast AWK implementation by Mike Brennan based on a bytecode interpreter.
 * libmawk is a fork of mawk, allowing applications to embed multiple parallel instances of awk interpreters.
 * awka (whose front end is written atop the mawk program) is another translator of AWK scripts into C code. When compiled, statically including the author's libawka.a, the resulting executables are considerably sped up and, according to the author's tests, compare very well with other versions of AWK, Perl, or Tcl. Small scripts will turn into programs of 160–170 kB.
 * tawk (Thompson AWK) is an AWK compiler for Solaris, DOS, OS/2, and Windows, previously sold by Thompson Automation Software (which has ceased its activities).
 * Jawk is a project to implement AWK in Java, hosted on SourceForge. Extensions to the language are added to provide access to Java features within AWK scripts (i.e., Java threads, sockets, collections, etc.).
 * xgawk is a fork of gawk that  extends gawk with dynamically loadable libraries. The XMLgawk extension was integrated into the official GNU Awk release 4.1.0.
 * QSEAWK is an embedded AWK interpreter implementation included in the QSE library that provides embedding application programming interface (API) for C and C++.
 * libfawk is a very small, function-only, reentrant, embeddable interpreter written in C
 * BusyBox includes an AWK implementation written by Dmitry Zakharov. This is a very small implementation suitable for embedded systems.
 * CLAWK by Michael Parker provides an AWK implementation in Common Lisp, based upon the regular expression library of the same author.
 * goawk is an AWK implementation in Go with a few convenience extensions by Ben Hoyt, hosted on Github.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: AWK


text:
Asgard

In Nordic mythology, Asgard (Old Norse: Ásgarðr; "enclosure of the Æsir") is a location associated with the gods. It appears in several Old Norse sagas and mythological texts, including the Eddas, however it has also been suggested to be referred to indirectly in some of these sources. It is described as the fortified home of the Æsir gods and is often associated with gold imagery and contains many other locations known in Nordic mythology such as Valhöll, Iðavöllr and Hlidskjálf.

In some euhemeristic accounts, Asgard is portrayed as being a city in Asia or Troy, however in other accounts that likely more accurately reflect its conception in Old Nordic religion, it is depicted as not conforming to a naturalistic geographical position. In these latter accounts, it is found in a range of locations such as over the rainbow bridge Bifröst, in the middle of the world and over the sea.

Etymology
The word Ásgarðr is a compound formed from āss ("god") and garðr ("enclosure"). Possible anglicisations include: Ásgarthr, Ásgard, Ásegard, Ásgardr, Asgardr, Ásgarth, Asgarth, Esageard, and Ásgardhr.

The Poetic Edda
Asgard is named twice in Eddic poetry. The first case is in Hymiskviða, when Thor and Týr journey from Asgard to Hymir's hall to obtain a cauldron large enough to brew beer for a feast for Ægir and the gods. The second instance is in Þrymskviða when Loki is attempting to convince Thor to dress up as Freyja in order to get back Mjölnir by claiming that without his hammer to protect them, jötnar would soon be living in Asgard.

Grímnismál contains among its cosmological descriptions, a number of abodes of the gods, such as Álfheim, Nóatún and Valhalla, which some scholars have identified as being in Asgard. It is to be noted, however, that Asgard is not mentioned at any point in the poem. Furthermore, Völuspá references Iðavöllr, one of the most common meeting places of Æsir gods, which in Gylfaginning, Snorri locates in the centre of Asgard.

Prologue
The Prose Edda's euhemeristic prologue portrays the Æsir gods as people that travelled from the East to northern territories. According to Snorri, Asgard represented the town of Troy before Greek warriors overtook it. After the defeat, Trojans moved to northern Europe, where they became a dominant group due to their "advanced technologies and culture". Eventually, other tribes began to perceive the Trojans and their leader Trór (Thor in Old Norse) as gods.

Gylfaginning
In Gylfaginning, Snorri Sturluson describes how during the creation of the world, the gods made the earth and surrounded it with the sea. They made the sky from the skull of Ymir and settled the jötnar on the shores of the earth. They set down the brows of Ymir, forming Midgard, and in the centre of the world they built Asgard, which he identifies as Troy:

After Asgard is made, the gods then built a hof named Glaðsheimr at Iðavöllr, in the centre of the burg, or walled city, with a high seat for Odin and twelve seats for other gods. It is described as like gold both on the inside and the outside, and as the best of all buildings in the world. They also built Vingólf for the female gods, which is described as both a hall and a hörgr, and a forge with which they crafted objects from gold. After Ragnarök, some gods such as Váli and Baldr will meet at Iðavöllr where Asgard once stood and discuss matters together. There they will also find in the grass the golden chess pieces that the Æsir had once owned.

Later, the section describes how an unnamed jötunn came to the gods with his stallion, Svaðilfari and offered help in building a burg for the gods in three winters, asking in return for the sun, moon, and marriage with Freyja. Despite Freyja's opposition, together the gods agree to fulfill his request if he completes his work in just one winter. As time goes on, the gods grow desperate as it becomes apparent that the jötunn will construct the burg on time. To their surprise, his stallion contributes much of the progress, swiftly moving boulders and rocks. To deal with the problem, Loki comes up with a plan whereupon he changes his appearance to that of a mare, and distracts Svaðilfari to slow down construction. Without the help of his stallion, the builder realises he cannot complete his task in time and goes into a rage, revealing his identity as a jötunn. Thor then kills the builder with Mjöllnir, before any harm to the gods is done. The chapter does not explicitly name Asgard as the fortress but they are commonly identified by scholars.

In Gylfaginning, the central cosmic tree Yggdrasil is described as having three roots that hold it up; one of these goes to the Æsir, which has been interpreted as meaning Asgard. In Grímnismál, this root instead reaches over the realm of men. The bridge Bifröst is told to span from the heavens to the earth and over it the Æsir cross each day to hold council beneath Yggdrasil at the Urðarbrunnr. Based on this, Bifröst is commonly interpreted as the bridge to Asgard.

Skáldskaparmál
Asgard is mentioned briefly throughout Skáldskaparmál as the name for the home of the Æsir, as in Gylfaginning. In this section, a number of locations are described as lying within Asgard including Valhalla, and in front of its doors, the golden grove Glasir. It also records a name for Thor as 'Defender of Ásgard' (verjandi Ásgarðs).

Ynglinga Saga
In the Ynglinga saga, found in Heimskringla, Snorri describes Asgard as a city in Asia, based on a perceived, but erroneous, connection between the words for Asia and Æsir. In the opening stanzas of the Saga of the Ynglings, Asgard is the capital of Asaland, a section of Asia east of the river Tana-kvísl or Vana-Kvísl (kvísl is "arm"), which Snorri explains is the river Tanais (now Don), flowing into the Black Sea. Odin then leaves to settle in the northern part of the world and leaves his brothers Vili and Vé to rule over the city. When the euhemerised Odin dies, the account states that the Swedes believed he had returned to Asgard and would live there forever.

Interpretation and discussion
Cosmology in Old Nordic religion is presented in a vague and often contradictory manner when viewed from a naturalistic standpoint. Snorri places Asgard in the centre of the world, surrounded by Midgard and then the lands inhabited by jötnar, all of which are finally encircled by the sea. He also locates the homes of the gods in the heavens. This had led to the proposition of a system of concentric circles, centred on Asgard or Yggdrasil, and sometimes with a vertical axis, leading upwards towards the heavens. There is debate between scholars over whether the gods were conceived of as living in the heavens, with some aligning their views with Snorri, and others proposing that he at times presents the system in a Christian framework and that this organisation is not seen in either Eddic or skaldic poetry. The concept of attempting to create a spatial cosmological model has itself been criticised by scholars who argue that the oral traditions did not form a naturalistic, structured system that aimed to be internally geographically consistent. An alternative proposal is that the world should be conceived of as a number of realms connected by passages that cannot be typically traversed. This would explain how Asgard can be located both to the east and west of the realm of men, over the sea and over Bifröst.

It has been noted that the tendency to link Asgard to Troy is part of a wider European cultural practice of claiming Trojan origins for one's culture, first seen in the Aeneid and also featuring in Geoffrey of Monmouth's Historia regum Britanniae for the founding of Britain.

Depictions in popular culture
Thor first appeared in the Marvel Universe within comic series Journey into Mystery in the issues #83 during August 1962. Following this release, he becomes one of the central figures in the comics along with Loki and Odin. In the Marvel Cinematic Universe, Thor and Loki make their first appearance together in the 2011 film Thor. After that, Thor becomes a regular character in the Marvel Cinematic Universe and reappears in several films, including the Avengers series. Asgard becomes the central element of the film Thor: Ragnarok, where it is destroyed following the Old Norse mythos. These and other Norse mythology elements also appear in video games, TV series, and books based in and on the Marvel Universe, although these depictions do not closely follow historical sources.

Asgard is an explorable realm in the video game God of War: Ragnarök, a sequel to 2018's Norse-themed God of War.

In the Assassin's Creed Valhalla video game, Asgard is featured as part of a "vision quest".

title: Asgard