What Does =* Mean

What does =* mean?

This:

WHERE t.column =* s.column

...is old TSQL (pre SQL Server 2005) outer join syntax, and is not an ANSI JOIN.

Reference: SQL Server 2005 Outer Join Gotcha

What do these ( += , -= , *= , /= ) Operators Mean?

They are shorthand:

a += b

is the same as

a = a + b

Etc...

so

  • a -= b is equivalent to a = a - b
  • a *= b is equivalent to a = a * b
  • a /= b is equivalent to a = a / b

As Kevin Brydon suggested - Familiarize yourself with the operators in C# here.

What does the /= operator mean in Python?

It's an assignment operator shorthand for / and =.

Example:

x = 12
x /= 3
# equivalent to
x = x / 3

If you use help('/='), you can get the full amount of symbols supported by this style of syntax (including but not limited to +=, -=, and *=), which I would strongly encourage.

What exactly does *= mean in C programming?

It's equivalent to:

rot = rot * 5;

It's part of a family of operators called 'compound assignment' operators. You can see the full list of them here: Compound Assignment Operators (Wikipedia)

Note that *= isn't a bitwise operator, because * isn't. But some compound operators are bitwise - for example, the &= operator is bitwise, since & is.

What does =+ mean in C?

In ancient versions of C, =+ was equivalent to +=. Remnants of it have been found alongside the earliest dinosaur bones.

For example, B introduced generalized assignment operators, using x+=y to add y to x. The notation came from Algol 68 via McIlroy, who incorporated it in his version of TMG. (In B and early C, the operator was spelled =+ instead of +=; this mistake, repaired in 1976, was induced by a seductively easy way of handling the first form in B's lexical analyzer.)

[The Development of the C Language, Dennis Ritchie. Copyright ACM, 1993. Internal citations omitted.]

Since the mid-1970's, it has no special meaning -- it's just a = followed by a +.

What does =* mean? (Winsock - C++)

It means de-reference something and assign it to the LHS.

SomeType LHS;
SomeType* Something = ....;
LHS = *(Something);

See dereference operator.

What does *= mean in Python and why is it used over =?

That's the same as:

bill = bill * 1.15

You could also do per example:

bill += 1.15

Which is the same as:

bill = bill + 1.15

What does *= mean in Java?

a *= b; is equivalent to a = a * b;

You're probably (maybe?) familiar with the += operator. There is a similar operator for all the basic math functions.

  • +=: a += b; is equivalent to a = a + b;
  • -=: a -= b; is equivalent to a = a - b;
  • *=: a *= b; is equivalent to a = a * b;
  • /=: a /= b; is equivalent to a = a / b;
  • %=: a %= b; is equivalent to a = a % b;

And please make note of @ruakh's comment:

Note that a *= b evaluates a only once, whereas a = a * b evaluates it
twice. (That doesn't make a difference if a is just a variable or
field name, but if it's a more complicated expression, such as f().x
or f.g.x, that can matter a great deal.)

What does % % mean in R

The infix operator %>% is not part of base R, but is in fact defined by the package magrittr (CRAN) and is heavily used by dplyr (CRAN).

It works like a pipe, hence the reference to Magritte's famous painting The Treachery of Images.

What the function does is to pass the left hand side of the operator to the first argument of the right hand side of the operator. In the following example, the data frame iris gets passed to head():

library(magrittr)
iris %>% head()
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.1 3.5 1.4 0.2 setosa
2 4.9 3.0 1.4 0.2 setosa
3 4.7 3.2 1.3 0.2 setosa
4 4.6 3.1 1.5 0.2 setosa
5 5.0 3.6 1.4 0.2 setosa
6 5.4 3.9 1.7 0.4 setosa

Thus, iris %>% head() is equivalent to head(iris).

Often, %>% is called multiple times to "chain" functions together, which accomplishes the same result as nesting. For example in the chain below, iris is passed to head(), then the result of that is passed to summary().

iris %>% head() %>% summary()

Thus iris %>% head() %>% summary() is equivalent to summary(head(iris)). Some people prefer chaining to nesting because the functions applied can be read from left to right rather than from inside out.



Related Topics



Leave a reply



Submit