Everything2
Near Matches
Ignore Exact
Full Text
Everything2

scalar

"scalar" is also a: user

created by Woundweavr

(thing) by Woundweavr (3.8 y) (print)   ?   I like it! Sat Nov 13 1999 at 10:28:22

Variable in Perl. Basically any singular item. A number, a character, or a string could be a scalar. It is indicated by a $.
Also in physics, a one dimensional measurement. For instance, speed is scalar because it only mentions rate, and not direction.

(thing) by WWWWolf (1.2 y) (print)   ?   I like it! Thu Apr 05 2001 at 18:39:31

Perl command scalar forces the argument to be evaluated in scalar context, when it normally could be evaluated in list context.

This is usually very handy because when you evaluate any @array in scalar context, you get the length of the array. (Agreeably scalar(@array) isn't the most intuitive way of getting the length of array, though. Most newbies seem to use $#array-1 to get the array length... note, of course, that length(@array) doesn't work!)


(definition) by Webster 1913 (print) I like it! Wed Dec 22 1999 at 2:52:50

Sca"lar (?), n. Math.

In the quaternion analysis, a quantity that has magnitude, but not direction; -- distinguished from a vector, which has both magnitude and direction.

 

© Webster 1913.


printable version
chaos

vector vector addition Linear algebra Graham's scan
continuum model vector space Centre Perl: Hashes
How to test if a ray intersects with a sphere Perl scalar triple product String
variable Shortest distance from a point to a plane scalar context PHP
Tensor Discontinuous eigenvalue vector differential identities
dot product Zippy typeglob Men like large amounts of kinetic energy
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Just another sprinkling of indeterminacy
St Kilda
Dr. Strangelove, or How I Learned to Stop Worrying and Love the Bomb
poutine
Deacon Blues
Periodic Table of the Elements
chemtrails
Everything2 as a discussion forum
The Contents Of Lincoln's Pockets
November 15, 2004
Dai-Un's Memory
My biological clock is not ticking, dammit!
Inhale. Kill. Exhale.
Déjà Vu All Over Again: Unoriginality in Hollywood
New Writeups
Glowing Fish
The Uncanny X-Men and the New Teen Titans(thing)
WolfKeeper
Launch loop(idea)
TendoKing
Katana(person)
Wuukiee
Highly ornamental cultivars of brambles still have as many thorns as their wild counterparts(idea)
TheDeadGuy
Editor Log: May 2008(log)
everyday j.Lo
pray do not molest them(thing)
ammie
Bands Who Take Their Names from Eighteenth-century English Poetry and Prose(idea)
shaogo
Under My Thumb(review)
ammie
Rock On(person)
The Custodian
The Dresden Files(thing)
Ouzo
PETA becomes you, a proposed future(fiction)
Ereneta
Stone Soup, Part Two(fiction)
jjen
Sorrier than I ever thought I would be(personal)
locke baron
Moskva class antisubmarine cruiser(thing)
Wuukiee
May 15, 2008(idea)
Everything 2 is brought to you by the letter C and The Everything Development Company