Shine Tutorial    
  shinetutorialtopsideimage
HOME DOS OS C,C++ HTML CSS XML JAVA ASP PHP SQL OFFICE MULTIMEDIA MORE... CERTIFICATION ABOUT
 
S T ADVT
Dictionary
 

- Computer Dictionary and Glossary -

Ampersand

 

Ampersand   The Ampers and ( & ) symbol, also referred to as the "epershand" or "and" symbol, is found above the number 7 key on a US QWERTY keyboard. In literature or English text, the ampersand is used as shorthand to mean "and", as in "John & Rob went to the baseball game". It is also used in a number of programming languages, including Visual Basic (to combine variables and literal text together or to signify two lines of code as being a continuous line), C++ (denoting an address in memory) and Perl (to call a user-defined subroutine). It can also be used in Excel spreadsheet formulas to combine several values (cells) into a single value (cell).

 

Excel formula with a Ampersand

Perl example

&sayhello;

sub sayhello {
print "hello";
}

Visual Basic example

dim vFirst as string
dim vLast as string
dim vFullName as string

vFirst = "John"
vLast = "Smith"

vFullName = vFirst & " " & vLast

Also see: Boolean, Keyboard definitions, Operator