text:
I Want to Know What Love Is
From Wikipedia, the free encyclopedia
Jump to: navigation, search
"I Want to Know What Love Is"
Cover art released in some European territories
Single by Foreigner
from the album Agent Provocateur
B-side
"Street Thunder (Marathon Theme)"
Released
November 13, 1984
Format
7"
12"
Genre
Soft rock[1]
Length
5:04 (album/7" single)
6:23 (12" extended)
4:15 (some radio edits)
Label
Atlantic
Songwriter(s)
Mick Jones
Producer(s)
Mick Jones
Alex Sadkin
Foreigner singles chronology
"Luanne"
(1982) "I Want to Know What Love Is"
(1984) "That Was Yesterday"
(1985)
"Luanne"
(1982) "I Want to Know What Love Is"
(1984) "That Was Yesterday"
(1985)
Audio sample
file
help
"I Want to Know What Love Is" is a power ballad[2] by the British-American rock band Foreigner. It was released in November 1984 as the lead single from their fifth album, Agent Provocateur. The song hit number one in both the United Kingdom and the United States and is the group's biggest hit to date. It remains one of the band's best-known songs and most enduring radio hits, charting in the top 25 in 2000, 2001, and 2002 on the Billboard Hot Adult Contemporary Recurrents chart. "I Want to Know What Love Is" has continued to garner critical acclaim, and is listed as one of Rolling Stone Magazine's greatest songs of all time at #479.[3] The song is also featured in a number of films.
Contents
[hide]
1 Song information
2 Chart performance
2.1 Weekly charts
2.2 Year-end charts
2.3 Certifications
2.4 Chart succession
3 New Jersey Mass Choir version
4 Tina Arena version
4.1 Track listings
4.2 Charts
4.3 Certifications
5 Wynonna Judd version
5.1 Personnel
5.2 Track listings
5.3 Charts
5.4 Release history
6 Mariah Carey version
6.1 Critical reception
6.2 Performances and promotion
6.3 Music video
6.4 Formats and track listings
6.5 Chart performance
6.6 Charts
6.7 Release history
6.8 Chart succession
7 Other covers
8 See also
9 References
10 External links
Song information
I always worked late at night, when everybody left and the phone stopped ringing. "I Want To Know What Love Is" came up at three in the morning sometime in 1984. I don’t know where it came from. I consider it a gift that was sent through me. I think there was something bigger than me behind it. I’d say it was probably written entirely by a higher force.
“
”
Mick Jones[4]
Written and composed by Mick Jones, with an uncredited portion (somewhere between 5% according to Jones and 40% according to Gramm) by Lou Gramm, and produced by Jones and Alex Sadkin, "I Want to Know What Love Is" was the first single released from Foreigner's album Agent Provocateur (1984).[5][6] The song features backing vocals from the New Jersey Mass Choir affiliated with the Gospel Music Workshop of America, Dreamgirls star Jennifer Holliday, and featured keyboard work by Thompson Twins frontman Tom Bailey.[7] The choir also appears in the song's music video.
"I Want to Know What Love Is" reached #1 in the UK Singles Chart on January 15, 1985, displacing Band Aid's "Do They Know It's Christmas?", staying there for three weeks, and knocked Madonna's long-running "Like a Virgin" out of #1 on the Billboard Hot 100 on February 2, 1985. It was Foreigner's first and only pop chart topper in either country, although the band had four #1 Mainstream Rock hits and a #1 Adult Contemporary radio hit in the US. This was the band's third of four #1 singles on the Mainstream Rock chart. The song spent five weeks at #1 in Australia and also hit the top of the charts in Canada, Ireland, New Zealand, Norway, and Sweden, peaking at #2 in Switzerland and South Africa.
We did a few takes, and it was good, but it was still a bit tentative. So then they all got round in a circle, held hands and said The Lord's Prayer. And it seemed to inspire them, because after that they did it in one take. I was in tears, because my mum and dad were in the studio too, and it was so emotional.
“
”
— Mick Jones on recording with the choir.[8]
The song has received positive retrospective reviews from critics, with Bret Adams of AllMusic writing: "It's not hard to see why it became Foreigner's first #1 single. Its dreamy, hypnotic feel is due in part to Lou Gramm's soulful lead vocals and the New Jersey Mass Choir's background vocals."[5]
The song was also issued as a 12" single with a longer time length of 6:23. This version contains a slightly longer intro and an extended vocal chorus/fadeout ending. The single's B-Side "Street Thunder (Marathon Theme)" is an instrumental track originally appearing on The Official Music of the XXIII Olympiad – Los Angeles 1984 and later on the band's 2-CD compilation Jukebox Heroes: The Foreigner Anthology (2000).
Soon after Foreigner's single topped the charts, the New Jersey Mass Choir released its own similar-sounding version of the song on an album that it also titled I Want to Know What Love Is. The choir's single peaked at #37 on the Hot Black Singles chart and #12 on the Hot Dance Music/Maxi-Singles Sales chart.
The Foreigner song was ranked by Billboard as the #4 Billboard Hot 100 single of 1985.[9] It was the band's third Platinum single in the U.S.[10] and their first and only Gold single in the UK.[11]
Originally consisting of three verses, a pre-chorus and a chorus, the song was extended with a bridge written by original songwriter Mick Jones specifically for Tina Arena's cover in 1998.
Chart performance
Weekly charts
Chart (1985)
Peak
position
Australia (Kent Music Report)[12] 1
Austria (Ö3 Austria Top 40)[13] 7
Belgium (Ultratop 50 Flanders)[14] 6
Belgium (VRT Top 30 Flanders)[15] 7
Canada Adult Contemporary (RPM)[16] 9
Canada Top Singles (RPM)[17] 1
Canada (CHUM)[18] 1
France (SNEP)[19] 18
Germany (Official German Charts)[20] 3
Ireland (IRMA)[21] 1
Italy (FIMI)[22] 25
Netherlands (Dutch Top 40)[23] 6
Netherlands (Single Top 100)[24] 5
New Zealand (Recorded Music NZ)[25] 1
Norway (VG-lista)[26] 1
South Africa (Springbok Radio)[27] 2
Spain (AFYVE)[28] 8
Sweden (Sverigetopplistan)[29] 1
Switzerland (Schweizer Hitparade)[30] 2
UK Singles (Official Charts Company)[31] 1
US Billboard Hot 100[32] 1
US Mainstream Rock (Billboard)[33] 1
US Adult Contemporary (Billboard)[34] 3
US Hot R&B/Hip-Hop Songs (Billboard)[35] 85
US Cash Box Top 100[36] 1
Year-end charts
Chart (1985)
Rank
Australia (Kent Music Report)[37] 5
Austria (Ö3 Austria Top 40)[38] 22
Belgium (Ultratop 50 Flanders)[39] 30
Canada Top Singles (RPM)[40] 3
Germany (Official German Charts)[41] 16
Netherlands (Dutch Top 40)[42] 24
Netherlands (Single Top 100)[43] 36
New Zealand (Recorded Music NZ)[44] 17
South Africa (Springbok Radio)[45] 12
Switzerland (Schweizer Hitparade)[46] 12
UK Singles (Official Charts Company)[47] 11
US Billboard Hot 100[9] 4
US Adult Contemporary (Billboard)[48] 21
US Mainstream Rock Tracks (Billboard)[49] 16
US Cash Box Top 100[50] 8
Certifications
Region
Certification
Certified units/Sales
United Kingdom (BPI)[11]
Gold 500,000^
United States (RIAA)[51]
2× Platinum 2,000,000^
*sales figures based on certification alone
^shipments figures based on certification alone
Chart succession
[show]Order of precedence
Preceded by
"Do They Know It's Christmas?" by Band Aid UK Singles Chart number-one single
January 19, 1985 – February 2, 1985 (3 weeks) Succeeded by
"I Know Him So Well" by Elaine Paige and Barbara Dickson
Preceded by
"The Boys of Summer" by Don Henley Billboard Mainstream Rock Tracks number-one single
January 19, 1985 (1 week) Succeeded by
"The Old Man Down the Road" by John Fogerty
Preceded by
"Do They Know It's Christmas?" by Band Aid Sverigetopplistan number-one single
January 25, 1985 – March 22, 1985 (10 weeks) Succeeded by
"We Are the World" by USA for Africa
Irish Singles Chart number-one single
January 26, 1985 – February 2, 1985 (2 weeks) Succeeded by
"I Know Him So Well" by Elaine Paige and Barbara Dickson
Preceded by
"Like a Virgin" by Madonna Billboard Hot 100 number-one single
February 2, 1985 – February 9, 1985 (2 weeks) Succeeded by
"Careless Whisper" by Wham! featuring George Michael
Cash Box Top 100 number-one single
February 2, 1985 (1 week) Succeeded by
"Easy Lover" by Philip Bailey and Phil Collins
Preceded by
"Do They Know It's Christmas?" by Band Aid Kent Music Report number-one single
February 11, 1985 – March 11, 1985 (5 weeks) Succeeded by
"One Night in Bangkok" by Murray Head
VG-lista number-one single
February 1985 – March 1985 (5 weeks) Succeeded by
"Woodpeckers from Space" by VideoKids
Preceded by
"Easy Lover" by Philip Bailey and Phil Collins Canadian CHUM Chart number-one single
February 16, 1985 – February 23, 1985 (2 weeks) Succeeded by
"California Girls" by David Lee Roth
Preceded by
"Do They Know It's Christmas?" by Band Aid
"Born in the U.S.A." by Bruce Springsteen New Zealand Singles Chart number one single
February 17, 1985 (1 week)
March 3, 1985 – March 10, 1985 (2 weeks) Succeeded by
"Born in the U.S.A." by Bruce Springsteen
"Solid" by Ashford & Simpson
Preceded by
"Easy Lover" by Philip Bailey and Phil Collins Canadian "RPM" Singles Chart number-one single
February 23, 1985 – March 9, 1985 (3 weeks) Succeeded by
"Neutron Dance" by Pointer Sisters
New Jersey Mass Choir version
In 1985, the New Jersey Mass Choir released the Prelude Records album entitled I Want to Know What Love Is. The album's fifth track, "I Want to Know What Love Is", was released as a single in the gospel music market which garnered several awards within the industry.
Tina Arena version
"I Want to Know What Love Is"
Single by Tina Arena
from the album In Deep
Released
August 6, 1998 (Australia)
January 29, 1999 (France)
Length
6:21 (album version)
5:34 (Australian album edit)
4:55 (single edit)
Label
Columbia
Songwriter(s)
Mick Jones
Producer(s)
Mick Jones
Tina Arena singles chronology
"Whistle Down the Wind"
(1998) "I Want to Know What Love Is"
(1998) "I Want to Spend My Lifetime Loving You"
(1998)
"Whistle Down the Wind"
(1998) "I Want to Know What Love Is"
(1998) "I Want to Spend My Lifetime Loving You"
(1998)
"I Want to Know What Love Is" was covered by Australian singer Tina Arena and her recording was released as a single in 1998 from her album In Deep. Arena's version of the song was produced by Foreigner band member Mick Jones, who wrote the song. This version of the song includes a previously unrecorded bridge between the second and third choruses, specifically written for Tina Arena by Mick Jones.
Track listings
European Maxi Single
"I Want to Know What Love Is" (Single Edit)
"I Want to Know What Love Is" (R & B Mix)
"I Want to Spend My Lifetime Loving You" (G-Vo Extended Mix)
"Not For Sale"
Australian CD1 Maxi Single
"I Want To Know What Love Is" (Single Edit)
"Now I Can Dance" (Spanglish Version)
"Now I Can Dance" (Live)
"If I Didn't Love You" (Remix)
Australian CD2 Maxi Single – The Remixes
"I Want to Know What Love Is" (R'n'B Mix)
"I Want to Know What Love Is" (Urban Mix)
"I Want to Know What Love Is" (Extended Urban Mix)
"I Want to Know What Love Is" (Single Edit)
Charts
The song peaked at #13 in France and finished 60th on the end-of-year chart of 1999.[52]
Chart (1998/99)
Peak
Position
Australia (ARIA)[53] 36
Belgium (Ultratop 50 Wallonia)[54] 39
Brazilian Singles Chart (ABPD)[55] 65
European Hot 100 Singles[56] 50
France (SNEP)[57] 13
Certifications
Region
Certification
Certified units/Sales
France (SNEP)[58]
Silver 194,000[59]
^shipments figures based on certification alone
Wynonna Judd version
"I Want to Know What Love Is"
Single by Wynonna Judd
from the album What the World Needs Now Is Love
Released
August 24, 2004
Length
5:41 (album version)
Label
Asylum
Curb Records
Songwriter(s)
Mick Jones
Producer(s)
Narada Michael Walden
Wynonna
Wynonna Judd singles chronology
"Flies on the Butter"
(2004) "I Want to Know What Love Is"
(2004) "Rescue Me"
(2005)
"Flies on the Butter"
(2004) "I Want to Know What Love Is"
(2004) "Rescue Me"
(2005)
"I Want to Know What Love Is" was covered by American country singer Wynonna Judd and her recording was released in August 24, 2004 from her album What the World Needs Now Is Love as fourth single. Wynonna's version of the song was produced by Narada Michael Walden, known for his work with Mariah Carey, Whitney Houston, Diana Ross, Aretha Franklin and George Michael, and Wynonna. This version of the song was included in a popular Brazilian soap opera, Senhora do Destino.
Personnel
Tim Akers – keyboards
Robert Bailey – background vocals
Jeff Beck – electric guitar
Bekka Bramlett – background vocals
Mike Brignardello – bass guitar
Tom Bukovac – electric guitar
David Campbell – string arrangements, conductor
Kim Fleming – background vocals
Paul Franklin – steel guitar
Reggie Hamilton – bass guitar
Vicki Hampton – background vocals
Dann Huff – electric guitar
David Huff – loop programming
Ronn Huff – string arrangements
Wynonna Judd – lead vocals
Suzie Katayama – string contractor
Jerry McPherson – electric guitar
Steve Nathan – keyboards
Don Potter – acoustic guitar
John "J.R." Robinson – drums
Willie Weeks – bass guitar
Track listings
Digital download
"I Want To Know What Love Is" — 5:41
Remixes
"I Want To Know What Love Is" (Piper Remix) — 4:05
"I Want To Know What Love Is" (Piper Club Mix) — 7:42
Charts
In the US, the song peaked at #14 on the Billboard Adult Contemporary chart. On the Hot Dance Club Songs of Billboard, it debuted at #50 and peaked at #12. It is also her first single to chart in Sweden, where it debuted at #67 and peaked at #15.
Chart (2004/2005)
Peak
position
Sweden (Sverigetopplistan)[60] 15
US Billboard Adult Contemporary[61] 14
US Billboard Hot Dance Club Songs[62] 12
Release history
Country
Date
Format
Label
United States August 24, 2004[63] Digital download, CD single Asylum
United States Remixes Curb Records
Sweden February 20, 2005 Digital download, CD single Curb Records
Mariah Carey version
"I Want to Know What Love Is"
Single by Mariah Carey
from the album Memoirs of an Imperfect Angel
Released
September 22, 2009
Format
CD single
digital download
Recorded
2009
Length
3:27 (album version)
3:38 (radio/video version)
Label
Island
Songwriter(s)
Mick Jones
Producer(s)
Mariah Carey
C. "Tricky" Stewart
James "Big Jim" Wright
Randy Jackson (co.)
Mariah Carey singles chronology
"Obsessed"
(2009) "I Want to Know What Love Is"
(2009) "H.A.T.E.U."
(2009)
"Obsessed"
(2009) "I Want to Know What Love Is"
(2009) "H.A.T.E.U."
(2009)
"I Want to Know What Love Is" was covered by American singer Mariah Carey and released as the second single from her twelfth studio album, Memoirs of an Imperfect Angel (2009).[64] The single, produced by Carey, C. "Tricky" Stewart and James "Big Jim" Wright, was sent to European radio stations on August 28[65] and first impacted U.S. radio on September 14, 2009.[65] Mick Jones said of her version: "I think she's actually retained the integrity of the song. You know, the arrangement is very similar to the original. They haven't tampered with the song too much. She's captured a certain emotional thing, a feeling."
Critical reception
The single was generally well received by critics; Australian magazine Rhyme & Reason stated that "[While Carey stayed] [...] true to the original, this piano-led remake is less an overhaul of the classic '80s hit than it is a modest but impressive update."[66] The UK Daily Star gave it a 5 out of 5 rating: "[The song is] given the Carey treatment and [is] complete with choir and karaoke climax. It's a great rework."[67] Bill Lamb from About.com said that "Mariah Carey's new version could leave you speechless. The diversity of vocal coloring expressed in this recording is stunning. While the single Obsessed remains disappointing, this single is a reminder of just how formidable Carey's talents are given a strong production and arrangement".[65]
Writing in a Los Angeles Times music blog, Todd Martens said, "[T]ackling a well-known power ballad seems like a safe choice. It's a comfortable fall-back plan after "Obsessed" performed well, but did far from blockbuster numbers. It will undoubtedly be a hit, but it's giving me more reason to fear Imperfect Angel. The sort-of-real/sort-of-not feud with Eminem seemed largely a ploy to keep Carey in the headlines, and covering Foreigner seems just as calculated to steer Carey back onto familiar ground."[68]
Performances and promotion
Carey debuted "I Want to Know What Love Is" at her Live At The Pearl concerts in the Pearl Arena at The Palms Casino & Resort, Las Vegas, on September 11 and 12, 2009.[69]
Carey performed the song live on The Oprah Winfrey Show on September 18.[70]
A New York radio station contest featured as its prize a mini concert by Carey at the P.C. Richard Theater in TriBeCa, New York on October 5, where she sang the song as well as "Obsessed" and "H.A.T.E.U.", also from the album.[71]
Carey performed the single on Italy's X factor on November 11, and in France where she did various radio interviews.[72]
Music video
Carey filmed a music video for "I Want to Know What Love Is" in September 2009 in New York City, directed by Hype Williams.[73] The video premiered on Mariah's official website on November 13, 2009.[74] The video features Carey singing in Yankee Stadium, intercut with shots of audience members, often accompanied by loved ones, and some glimpses into the tough times in their past, as they grow emotional from the song's performance. A gospel choir joins Carey at the center of the stadium at the video's end. Carey wears the signature curly hairstyle from the initial stages of her career ca. 1990–1993, maintaining the Memoirs theme of the album.
Formats and track listings
Digital download
"I Want to Know What Love Is" (album version) — 3:26
UK digital single[75]
"I Want to Know What Love Is" (album version) — 3:26
"I Want to Know What Love Is" (Moto Blanco Club Edit) — 3:25
"I Want to Know What Love Is" (Chew Fu Radio Fix) — 3:51
European CD single[76]
"I Want to Know What Love Is" — 3:39
"Obsessed" (Cahill club edit) — 6:21
Chart performance
The song peaked on the US Billboard Adult Contemporary chart at #10 bringing Carey's total number of Top Ten hits on that chart to 20, one short of Celine Dion's record. She has since surpassed this and is now tied with Celine Dion after her single "Oh Santa!" reached #1 in 2010.[77] However, it peaked at #60 on the US Hot 100. On the UK Singles Chart, the song debuted at #19 on the week ending November 29, 2009, becoming her highest debuting and peaking song since 2008's "Touch My Body", which peaked at #5.[78]
The song debuted at #6 in France, selling 1,910 physical CDs in its first week and 39,720 copies in all formats as of late 2009,[79][80] becoming the best charting version of this song there. It placed 93rd on the Year-End Chart.
In Brazil, the song stayed at #1 for a record 27 weeks. One of the reasons for the song's radio success there was its frequent inclusion in a popular new soap opera, Viver a Vida. According to Crowley Broadcast Analysis, Carey's version has broken the record for longest Brazilian Hot 100 Airplay Chart run at 27 consecutive weeks.[81]
Charts
Chart (2009–10)
Peak
position
Australia (ARIA)[82] 45
Austria (Ö3 Austria Top 40)[83] 40
Belgium (Ultratip Wallonia)[84] 14
Brazil (Hot 100 Airplay)[85] 1
Canada (Canadian Hot 100)[86] 57
Denmark (Tracklisten)[87] 14
Europe (European Hot 100 Singles)[88] 16
France (SNEP)[89] 6
Germany (Official German Charts)[90] 37
Hungary (Mahasz)[91] 6
Ireland (IRMA)[92] 41
Japan (Japan Hot 100)[93] 3
Portugal (Billboard)[94] 5
Scotland (Official Charts Company)[95] 30
Slovakia (Rádio Top 100)[96] 84
Spain (PROMUSICAE)[97] 41
Sweden (Sverigetopplistan)[98] 20
Switzerland (Schweizer Hitparade)[99] 25
UK Singles (Official Charts Company)[100] 19
UK R&B (Official Charts Company)[101] 7
US Billboard Hot 100[102] 60
US Adult Contemporary (Billboard)[103] 10
US Adult Top 40 (Billboard)[104] 39
US Dance Club Songs (Billboard)[105] 2
US Hot R&B/Hip-Hop Songs (Billboard)[106] 40
US Mainstream Top 40 (Billboard)[107] 28
US Rhythmic (Billboard)[108] 29
Release history
Country
Date
Format
Label
United States September 22, 2009[109] Digital download Island Records
Norway October 20, 2009 The remixes (digital)[110] Universal Music
Korea CD single[111]
United Kingdom November 22, 2009[75][112] Digital download Mercury Records
France November 30, 2009[113] CD single Universal Music
Germany December 4, 2009[114]
Chart succession
Preceded by
"Halo" by Beyoncé Knowles Brazilian Hot 100 Airplay number-one single (Mariah Carey version)
December 2009 – June 2010 Succeeded by
"Tapa na Cara" by Zezé Di Camargo e Luciano
Other covers
In 1986, Laura Branigan sang the song in duet with John Farnham at Logie Awards, an Australian award show.
In 1998, Julie Ruin recorded a version of the song on their self-titled debut album [115] with rewritten lyrics about police abuse and neglect in cases of rape and femicide such as the Green River killer case.[116]
In 2002, the victims of the fires at a disco in Sweden and a bar in the Netherlands recorded this song as a way to cope with their injuries and memories regarding those incidents. Their single was released under the artist name Volendam meets Göteborg and reached #39 in the Dutch charts.[117]
in 2004, Filipina Popstar Princess Sarah Geronimo did a cover of the song from the album Sweet Sixteen.
In July 2016, Foreigner released a rerecorded version of the song featuring fun. lead singer Nate Ruess.[118]
See also
Book: Memoirs of an Imperfect Angel
List of Billboard Hot 100 number-one singles of 1985
References
Jump up ^ "Gig review: Journey/Foreigner/Styx". The Scotsman. June 10, 2011. Retrieved May 25, 2015.
Jump up ^ "The 21 best power ballads".
Jump up ^ "479. Foreigner, 'I Want to Know What Love Is'". Rolling Stone. Retrieved 10 November 2016.
Jump up ^ "The story behind Foreigner's I Want To Know What Love Is". Archived from the original on January 1, 2014. Retrieved 2016-11-07. CS1 maint: BOT: original-url status unknown (link)
^ Jump up to: a b Bret Adams. "Agent Provocateur – Foreigner | Songs, Reviews, Credits, Awards". AllMusic. Retrieved March 7, 2014.
Jump up ^ I Want to Know What Love Is – Foreigner Billboard Retrieved February 13, 2011
Jump up ^ Mick Jones (October 7, 2014). "I Wrote That: Foreigner – I Want to Know What Love is'". m-magazine.co.uk. Retrieved August 15, 2016.
Jump up ^ "Foreigner's Mick Jones Looks Back on 'I Want to Know What Love Is'". Ultimateclassicrock.com. December 27, 2013. Retrieved March 7, 2014.
^ Jump up to: a b "Top Pop Singles" (PDF). Billboard. Vol. 97 no. 52. New York, NY, USA. 28 December 1985. p. T-21. Retrieved 5 November 2016.
Jump up ^ "Gold & Platinum". RIAA. Retrieved November 5, 2016.
^ Jump up to: a b "British single certifications – Foreigner". British Phonographic Industry. Retrieved November 5, 2016. Enter Foreigner in the search field and then press Enter.
Jump up ^ bulion. "Forum – ARIA Charts: Special Occasion Charts – CHART POSITIONS PRE 1989". ARIA. Australian-charts.com. Archived from the original on October 20, 2013. Retrieved November 5, 2016.
Jump up ^ "Austriancharts.at – Foreigner – I Want to Know What Love Is" (in German). Ö3 Austria Top 40.
Jump up ^ "Ultratop.be – Foreigner – I Want to Know What Love Is" (in Dutch). Ultratop 50.
Jump up ^ "Radio 2 Top 30" (in Dutch). Top 30. Archived from the original on March 31, 2016. Retrieved November 5, 2016.
Jump up ^ "Top RPM Adult Contemporary: Issue 8337." RPM. Library and Archives Canada. Retrieved November 5, 2016.
Jump up ^ "Top RPM Singles: Issue 9611." RPM. Library and Archives Canada. Retrieved November 5, 2016.
Jump up ^ "CHART NUMBER 1469 – Saturday, February 16, 1985". Archived from the original on November 7, 2006. Retrieved April 23, 2017. CHUM.
Jump up ^ "Lescharts.com – Foreigner – I Want to Know What Love Is" (in French). Les classement single.
Jump up ^ "Offiziellecharts.de – Foreigner – I Want to Know What Love Is". GfK Entertainment Charts. Retrieved November 5, 2016.
Jump up ^ "The Irish Charts – Search Results – I Want to Know What Love Is". Irish Singles Chart. Retrieved November 5, 2016.
Jump up ^ "Hit Parade Italia – Indice per Interprete: F". Hit Parade Italia. Retrieved July 6, 2012.
Jump up ^ "Nederlandse Top 40 – week 7, 1985" (in Dutch). Dutch Top 40 Retrieved November 5, 2016.
Jump up ^ "Dutchcharts.nl – Foreigner – I Want to Know What Love Is" (in Dutch). Single Top 100. Retrieved November 5, 2016.
Jump up ^ "Charts.org.nz – Foreigner – I Want to Know What Love Is". Top 40 Singles.
Jump up ^ "Norwegiancharts.com – Foreigner – I Want to Know What Love Is". VG-lista.
Jump up ^ "South African Rock Lists Website SA Charts 1965 – 1989 Acts F". The South African Rock Encyclopedia. Retrieved November 5, 2016.
Jump up ^ Salaverri, Fernando (September 2005). Sólo éxitos: año a año, 1959–2002 (1st ed.). Spain: Fundación Autor-SGAE. ISBN 84-8048-639-2.
Jump up ^ "Swedishcharts.com – Foreigner – I Want to Know What Love Is". Singles Top 100.
Jump up ^ "Swisscharts.com – Foreigner – I Want to Know What Love Is". Swiss Singles Chart.
Jump up ^ "Foreigner: Artist Chart History". Official Charts Company.
Jump up ^ "Foreigner Chart History (Hot 100)". Billboard.
Jump up ^ "Foreigner Chart History (Mainstream Rock)". Billboard. Retrieved November 5, 2016.
Jump up ^ "Foreigner Chart History (Adult Contemporary)". Billboard.
Jump up ^ "Foreigner Chart History (Hot R&B/Hip-Hop Songs)". Billboard.
Jump up ^ "CASH BOX Top 100 Singles – Week ending FEBRUARY 2, 1985". Archived from the original on October 1, 2012. Retrieved April 23, 2017. Cash Box magazine.
Jump up ^ "Forum – ARIA Charts: Special Occasion Charts – Top 100 End of Year AMR Charts – 1980s". Australian-charts.com. Hung Medien. Archived from the original on August 28, 2014. Retrieved November 5, 2016.
Jump up ^ "Jahreshitparade Singles 1985". Ö3 Austria Top 40 (in German). Retrieved November 5, 2016.
Jump up ^ "Ultratop Jaaroverzichten 1985". Ultratop 50 (in Dutch). Archived from the original on June 10, 2014. Retrieved November 5, 2016.
Jump up ^ "Top RPM Singles: Issue 0619." RPM. Library and Archives Canada. Retrieved November 5, 2016.
Jump up ^ "Single-Jahrescharts 1985". GfK Entertainment Charts (in German). Retrieved November 5, 2016.
Jump up ^ "Top 100-Jaaroverzicht van 1985". Dutch Top 40 (in Dutch). Retrieved November 5, 2016.
Jump up ^ "Dutch Charts Jaaroverzichten Single 1985". Single Top 100 (in Dutch). Retrieved November 5, 2016.
Jump up ^ "The Official NZ Music Charts – End of Year Charts 1985". Recorded Music NZ. Retrieved November 5, 2016.
Jump up ^ "Top 20 Hit Singles of 1985". The South African Rock Encyclopedia. Retrieved November 5, 2016.
Jump up ^ "Schweizer Jahreshitparade 1985". Swiss Singles Chart (in German). Retrieved November 5, 2016.
Jump up ^ "Top 100 1985 – UK Music Charts". www.uk-charts.top-source.info.
Jump up ^ "Top Adult Contemporary Singles" (PDF). Billboard. Vol. 97 no. 52. 28 December 1985. p. T-28. Retrieved 5 November 2016. [permanent dead link]
Jump up ^ "Top Rock Tracks" (PDF). Billboard. Vol. 97 no. 52. 28 December 1985. p. T-30. Retrieved 5 November 2016. [permanent dead link]
Jump up ^ "The CASH BOX Year-End Charts: 1985". Archived from the original on January 18, 2008. Retrieved April 23, 2017. Cash Box magazine.
Jump up ^ "American single certifications – Foreigner – I Want to Know What Love Is". Recording Industry Association of America. Retrieved November 5, 2016. If necessary, click Advanced, then click Format, then select Single, then click SEARCH
Jump up ^ "Disque en France". Disque en France. Archived from the original on January 26, 2012. Retrieved October 3, 2009.
Jump up ^ "Australian-charts.com – Tina Arena – I Want to Know What Love Is". ARIA Top 50 Singles.
Jump up ^ "Ultratop.be – Tina Arena – I Want to Know What Love Is" (in French). Ultratop 50.
Jump up ^ "Brazil" (PDF). ABPD. October 6, 2001. Retrieved April 1, 2014.
Jump up ^ "Eurochart Hot 100 Position". Archived from the original on March 11, 2005. Retrieved September 10, 2010.
Jump up ^ "Lescharts.com – Tina Arena – I Want to Know What Love Is" (in French). Les classement single.
Jump up ^ "French single certifications – Tina Arena – I Want to Know What Love Is" (in French). Syndicat National de l'Édition Phonographique.
Jump up ^ "InfoDisc : Les Certifications (Singles) du SNEP (Bilan par Artiste)". Infodisc.fr. Archived from Infodisc.fr the original Check |url= value (help) on July 13, 2012. Retrieved November 9, 2013.
Jump up ^ "Billboard Sweden Singles Chart: Wynonna". swedishcharts.com. Retrieved February 11, 2011.
Jump up ^ "Billboard Chart History: Wynonna". Billboard. Retrieved February 11, 2011.
Jump up ^ "Dance/Mix Show Airplay : Jan 15, 2005 | Billboard Chart Archive". Billboard.com. January 15, 2005. Retrieved March 7, 2014.
Jump up ^ "iTunes: Wynonna – I Want to Know What Love Is – Single". iTunes. Retrieved February 11, 2011.
Jump up ^ "news.news". Mariahcarey.com. Archived from the original on September 8, 2009. Retrieved September 24, 2009.
^ Jump up to: a b c "Mariah Carey "I Want To Know What Love Is" Goes to European Radio – She Hits It Out of the Park". Top40.about.com. Retrieved September 24, 2009.
Jump up ^ "Exclusive Mariah Carey Album Preview " Rhyme & Reason Magazine". Rhymeandreason.com.au. August 15, 2009. Archived from the original on September 14, 2009. Retrieved September 24, 2009.
Jump up ^ "Simply The Best 7 Days A Week :: Playlist :: PREVIEW: Mariah Carey". Daily Star. August 7, 2009. Retrieved September 24, 2009.
Jump up ^ Martens, Todd. Mariah Carey bets on nostalgia, covering Foreigner. The LA Times Music Blog. August 18, 2009. Retrieved September 4, 2009.
Jump up ^ "SOUNDS: Mariah Carey shows at Pearl give audience chance to get close to star – Neon – ReviewJournal.com". Lvrj.com. Retrieved September 24, 2009.
Jump up ^ "Mariah Carey's I Want to Know What Love Is". Oprah.com. Archived from the original on April 21, 2012. Retrieved September 24, 2009.
Jump up ^ "News". Mariah Carey. Archived from the original on March 7, 2014. Retrieved March 7, 2014.
Jump up ^ "News". Mariah Carey. Archived from the original on March 7, 2014. Retrieved March 7, 2014.
Jump up ^ "News | Mariah Carey Finds Love In Reunion With Hype Williams". Singersroom. September 28, 2009. Retrieved March 7, 2014.
Jump up ^ "Mariah Carey Official Website: Music, Videos, Photos, Lyrics, Tour Dates, Forums". Mariahcarey.com. Retrieved March 7, 2014.
^ Jump up to: a b "UK digital single". Retrieved January 10, 2011. [dead link]
Jump up ^ "I Want To Know What Love Is – GERMAN 2track CD Single: Amazon.co.uk: Music". Amazon.co.uk. Retrieved March 7, 2014.
Jump up ^ "Chart Beat Wednesday: Miley Cyrus, Mariah Carey, Zac Brown Band". Billboard. Retrieved March 7, 2014.
Jump up ^ "ChartArchive – The Chart Archive". Chartstats.com. Retrieved March 7, 2014.
Jump up ^ "Disques : Vanessa Paradis (ne) détrône (pas) Renaud". Archived from the original on December 13, 2012. Retrieved April 23, 2017.
Jump up ^ "InfoDisc : Les Meilleurs Ventes de Singles en 2009". Infodisc.fr. Archived from the original on March 30, 2014. Retrieved March 7, 2014.
Jump up ^ "I Want To Know What Love Is Breaks Airplay Record in Brazil". MariahCarey.com. Archived from the original on October 7, 2012. Retrieved October 7, 2012.
Jump up ^ "Australian-charts.com – Mariah Carey – I Want To Know What Love Is". ARIA Top 50 Singles.
Jump up ^ "Austriancharts.at – Mariah Carey – I Want To Know What Love Is" (in German). Ö3 Austria Top 40.
Jump up ^ "Ultratop.be – Mariah Carey – I Want To Know What Love Is" (in French). Ultratip.
Jump up ^ "Brasil Hot 100 Airplay". Billboard Brasil (in Portuguese). Brazil: BPP: 79. January 2010.
Jump up ^ "Mariah Carey Chart History (Canadian Hot 100)". Billboard.
Jump up ^ "Danishcharts.com – Mariah Carey – I Want To Know What Love Is". Tracklisten.
Jump up ^ "Mariah Carey – Chart history" European Hot 100 for Mariah Carey.
Jump up ^ "Lescharts.com – Mariah Carey – I Want to Know What Love Is" (in French). Les classement single.
Jump up ^ "Musicline.de – Carey, Mariah Single-Chartverfolgung" (in German). Media Control Charts. PhonoNet GmbH.
Jump up ^ "Single (track) Top 10 lista". Mahasz. Archived from the original on August 3, 2012. Retrieved April 23, 2017.
Jump up ^ "Chart Track: Week 48, 2009". Irish Singles Chart.
Jump up ^ "Mariah Carey Chart History (Japan Hot 100)". Billboard.
Jump up ^ "Mariah Carey – I Want To Know What Love Is – Portugal Digital Songs". Billboard.biz. Archived from the original on September 12, 2012. Retrieved September 12, 2012.
Jump up ^ "Official Scottish Singles Sales Chart Top 100". Official Charts Company.
Jump up ^ "SNS IFPI" (in Slovak). Hitparáda – Radio Top 100 Oficiálna. IFPI Czech Republic. Note: insert 20104 into search.
Jump up ^ "Spanishcharts.com – Mariah Carey – I Want To Know What Love Is" Canciones Top 50.
Jump up ^ "Swedishcharts.com – Mariah Carey – I Want To Know What Love Is". Singles Top 100.
Jump up ^ "Swisscharts.com – Mariah Carey – I Want To Know What Love Is". Swiss Singles Chart.
Jump up ^ "Mariah Carey: Artist Chart History". Official Charts Company.
Jump up ^ "Official R&B Singles Chart Top 40". Official Charts Company.
Jump up ^ "Mariah Carey Chart History (Hot 100)". Billboard.
Jump up ^ "Mariah Carey Chart History (Adult Contemporary)". Billboard.
Jump up ^ "Mariah Carey Chart History (Adult Pop Songs)". Billboard.
Jump up ^ "Mariah Carey Chart History (Dance Club Songs)". Billboard.
Jump up ^ "Mariah Carey Chart History (Hot R&B/Hip-Hop Songs)". Billboard.
Jump up ^ "Mariah Carey Chart History (Pop Songs)". Billboard.
Jump up ^ "Mariah Carey Chart History (Rhythmic)". Billboard.
Jump up ^ "news.news". Mariahcarey.com. Archived from the original on September 14, 2009. Retrieved September 24, 2009.
Jump up ^ "iTunes – Music – I Want to Know What Love Is (The Remixes) by Mariah Carey". Itunes.apple.com. October 16, 2009. Retrieved March 7, 2014.
Jump up ^ "대한민국 지식문화 대표브랜드 교보문고에 오신 것을 환영합니다. 로그인하시면 다양한 지식문화 서비스를 경험할 수 있습니다. 회원님의 웹브라우저 또는 PC환경에 따라 팝업창로그인 페이지가 제대로 작동하지 않을 수도 있습니다. 본 웹페이지에서 다시 ID와 비밀번호를 입력하여 주시면 정상적으로 로그인 하실 수 있습니다" (in Korean). Kyobobook.co.kr. Retrieved March 7, 2014.
Jump up ^ "iTunes – Music – Memoirs of an Imperfect Angel by Mariah Carey". Itunes.apple.com. September 25, 2009. Retrieved March 7, 2014.
Jump up ^ "I Want To Know What Love Is: Mariah Carey, James "Big Jim" Wright: Amazon.fr: Musique". Amazon.fr. September 9, 2009. Retrieved March 7, 2014.
Jump up ^ "I Want to Know What Love Is (2-Track): Mariah Carey: Amazon.de: Musik". Amazon.de. July 14, 2009. Retrieved October 15, 2009.
Jump up ^ A.J. Duric. "Review". MetroTimes.com. Retrieved May 6, 2014.
Jump up ^ Brian Flota. "Review". AllMusic.com. Retrieved May 6, 2014.
Jump up ^ Steffen Hung. "Dutch charts portal". dutchcharts.nl. Retrieved September 24, 2009.
Jump up ^ "Foreigner's "I Want to Know What Love Is" Duet with fun.'s Nate Ruess Available as a Digital Single". abcnewsradioonline.com. July 14, 2016. Retrieved July 22, 2016.
External links
Lyrics of this song at MetroLyrics
"I Want to Know What Love Is" (Foreigner version) music video at MTV.com (Windows Media Video format)
[show]
v
t
e
Foreigner
Mick Jones
Thom Gimbel
Jeff Pilson
Kelly Hansen
Michael Bluestein
Chris Frazier
Dennis Elliott
Lou Gramm
Al Greenwood
Ian McDonald
Ed Gagliardi
Rick Wills
Jack Allen Smith
Johnny Edwards
Jeff Jacobs
Mark Schulman
Bruce Turgon
Ron Wikso
Brian Tichy
Denny Carmassi
Jason Bonham
Chaz West
Paul Mirkovich
Jason Sutter
Studio albums
Foreigner
Double Vision
Head Games
4
Agent Provocateur
Inside Information
Unusual Heat
Mr. Moonlight
Can't Slow Down
Compilations
Records
The Very Best ... and Beyond
Jukebox Heroes: The Foreigner Anthology
Complete Greatest Hits
Hot Blooded and Other Hits
The Essentials
The Definitive Collection
No End in Sight: The Very Best of Foreigner
Live albums
Classic Hits Live/Best of Live
Extended Versions
Can't Slow Down...When It's Live!
Singles
"Feels Like the First Time"
"Starrider"
"Cold as Ice"
"Long, Long Way from Home"
"Hot Blooded"
"Double Vision"
"Blue Morning, Blue Day"
"Dirty White Boy"
"Head Games"
"Love on the Telephone"
"Women"
"I'll Get Even with You"
"Urgent"
"Juke Box Hero"
"Waiting for a Girl Like You"
"Night Life"
"Break It Up"
"Luanne"
"I Want to Know What Love Is"
"That Was Yesterday"
"Tooth and Nail"
"Reaction to Action"
"Growing Up the Hard Way"
"Down on Love"
"Say You Will"
"I Don't Want to Live Without You"
"Heart Turns to Stone"
"Can't Wait"
"Lowdown and Dirty"
"I'll Fight for You"
"With Heaven on Our Side"
"Soul Doctor"
"White Lie"
"Until the End of Time"
"Rain"
"Under the Gun"
"Too Late"
"When It Comes to Love"
"Can't Slow Down"
"In Pieces"
Related articles
Discography
Shadow King
Black Sheep
"Revenge of the Mooninites"
Book
[show]
v
t
e
Tina Arena singles
Strong as Steel
"I Need Your Body"
"The Machine's Breaking Down"
"Strong as Steel"
"Woman's Work"
Don't Ask
"Chains"
"Sorrento Moon (I Remember)"
"Heaven Help My Heart"
"Wasn't It Good"
"Show Me Heaven"
In Deep
"Burn"
"If I Didn't Love You"
"Now I Can Dance"
"Whistle Down the Wind"
"I Want to Know What Love Is"
"I Want to Spend My Lifetime Loving You"
"If I Was a River"
"Aller plus haut"
"Les trois cloches"
Just Me
"Soul Mate #9"
"Dare You to Be Happy"
"Tu es toujours là"
"Symphony of Life"
Vous êtes toujours là
"Je te retrouve un peu"
Greatest Hits 1994–2004
"Italian Love Song"
Un autre univers
"Aimer jusqu'à l'impossible"
"Je m'appelle Bagdad"
"Tu aurais dû me dire (Oser parler d'amour)"
Songs of Love & Loss
"To Sir with Love"
7 vies
"Entends-tu le monde?"
Songs of Love & Loss 2
"Oh Me, Oh My"
Reset
"You Set Fire to My Life"
Other releases
"Turn Up the Beat"
"Ti Voglio Qui"
"Live for the One I Love"
"Never (Past Tense)"
"Voici les clés"
"Only Lonely"
"The Things We Do For Love"
"Tant que tu es là"
Template
[show]
v
t
e
Wynonna Judd
Studio albums
Wynonna
Tell Me Why
Revelations
The Other Side
New Day Dawning
What the World Needs Now Is Love
A Classic Christmas
Sing: Chapter 1
Wynonna & the Big Noise
Compilation albums
Collection
Her Story: Scenes from a Lifetime
Love Heals
Notable singles
"She Is His Only Need"
"I Saw the Light"
"No One Else on Earth"
"My Strongest Weakness"
"Tell Me Why"
"Only Love"
"Is It Over Yet"
"Rock Bottom"
"Girls with Guitars"
"To Be Loved by You"
"Heaven Help My Heart"
"When Love Starts Talkin'"
"Come Some Rainy Day"
"Can't Nobody Love You (Like I Do)"
"What the World Needs"
"Heaven Help Me"
"Sing"
Guest singles
"A Bad Goodbye" (with Clint Black)
Related articles
Discography
The Judds
Ashley Judd
Naomi Judd
[show]
v
t
e
Mariah Carey songs
Singles discography
Songs recorded
1990s songs
"Vision of Love"
"Love Takes Time"
"Someday"
"I Don't Wanna Cry"
"There's Got to Be a Way"
"Emotions"
"Can't Let Go"
"Make It Happen"
"If It's Over"
"I'll Be There"
"Dreamlover"
"Hero"
"Anytime You Need a Friend"
"Without You"
"Never Forget You"
"Endless Love"
"All I Want for Christmas Is You"
"O Holy Night"
"Joy to the World"
"Fantasy"
"Underneath the Stars"
"One Sweet Day"
"Open Arms"
"Always Be My Baby"
"Forever"
"Honey"
"My All"
"Butterfly"
"The Roof"
"Breakdown"
"Close My Eyes"
"The Beautiful Ones"
"Sweetheart"
"When You Believe"
"I Still Believe"
"Theme from Mahogany (Do You Know Where You're Going To)"
"Heartbreaker"
"Thank God I Found You"
"Can't Take That Away (Mariah's Theme)"
"Against All Odds (Take a Look at Me Now)"
"Crybaby"
2000s songs
"Loverboy"
"Don't Stop (Funkin' 4 Jamaica)"
"Reflections (Care Enough)"
"Last Night a DJ Saved My Life"
"Never Too Far"
"Never Too Far/Hero Medley"
"Through the Rain"
"Boy (I Need You)"
"Bringin' On the Heartbreak"
"I Know What You Want"
"It's Like That"
"We Belong Together"
"Shake It Off"
"Mine Again"
"Say Somethin'"
"Get Your Number"
"Fly Like a Bird"
"Don't Forget About Us"
"So Lonely"
"Migrate"
"Touch My Body"
"I Stay in Love"
"Side Effects"
"I'm That Chick"
"I'll Be Lovin' U Long Time"
"Bye Bye"
"Hero" (2008 version)
"Betcha Gon' Know (The Prologue)"
"Obsessed"
"I Want to Know What Love Is"
"H.A.T.E.U."
2010s songs
"Up Out My Face"
"Angels Cry"
"Oh Santa!"
"Christmas Time Is in the Air Again"
"When Christmas Comes"
"One Child"
"Auld Lang Syne (The New Year's Anthem)"
"#Beautiful"
"Thirsty"
"You're Mine (Eternal)"
"You Don't Know What to Do"
"Meteorite"
"The Art of Letting Go"
"Infinity"
"I Don't"
Other releases
"100%"
"Almost Home"
"Everybody Hurts"
"Every Time I Close My Eyes"
"Just Stand Up!"
"Lil' L.O.V.E."
"My Love"
"Right to Dream"
"So Lonely"
"Things That U Do"
"Triumphant (Get 'Em)"
"U Make Me Wanna"
"What More Can I Give"
Book
Category
Portal
Retrieved from "https://en.wikipedia.org/w/index.php?title=I_Want_to_Know_What_Love_Is&oldid=821591507"
Categories:
1984 singles
1984 songs
1985 singles
1998 singles
2004 singles
2009 singles
Billboard Hot 100 number-one singles
Billboard Mainstream Rock number-one singles
Brasil Hot 100 Airplay number-one singles
Brasil Hot Pop number-one singles
Foreigner (band) songs
Mariah Carey songs
Music videos directed by Hype Williams
Number-one singles in Australia
Number-one singles in Norway
Number-one singles in Sweden
1980s ballads
Rock ballads
RPM Top Singles number-one singles
Songs written by Mick Jones (Foreigner)
Tina Arena songs
UK Singles Chart number-one singles
Wynonna Judd songs
Atlantic Records singles
Columbia Records singles
Asylum Records singles
Curb Records singles
Song recordings produced by Narada Michael Walden
Island Records singles
Song recordings produced by Tricky Stewart
Hidden categories:
CS1 maint: BOT: original-url status unknown
CS1 Dutch-language sources (nl)
CS1 German-language sources (de)
All articles with dead external links
Articles with dead external links from September 2017
Articles with permanently dead external links
CS1 French-language sources (fr)
Pages with URL errors
Articles with dead external links from June 2016
CS1 Portuguese-language sources (pt)
CS1 Korean-language sources (ko)
Wikipedia semi-protected pages
Use mdy dates from July 2014
Articles with hAudio microformats
Singlechart usages for Austria
Singlechart usages for Flanders
Singlechart usages for Canadaadultcontemporary
Singlechart called without artist
Singlechart called without song
Singlechart usages for Canadatopsingles
Singlechart making named ref
Singlechart usages for France
Singlechart usages for Germany2
Singlechart usages for Ireland2
Singlechart usages for Dutch40
Singlechart usages for Dutch100
Singlechart usages for New Zealand
Singlechart usages for Norway
Singlechart usages for Sweden
Singlechart usages for Switzerland
Singlechart usages for UKchartstats
Singlechart usages for Billboardhot100
Singlechart usages for Billboardmainstreamrock
Singlechart usages for Billboardadultcontemporary
Singlechart usages for Billboardrandbhiphop
Certification Table Entry usages for United Kingdom
Certification Table Entry usages for United States
Singlechart usages for Australia
Singlechart usages for Belgium (Wallonia)
Certification Table Entry usages for France
Pages using div col without cols and colwidth parameters
Singlechart usages for Belgium (Wallonia) Tip
Singlechart usages for Billboardcanadianhot100
Singlechart usages for Denmark
Singlechart usages for Billboardeuropeanhot100
Singlechart usages for Germany
Singlechart usages for Ireland
Singlechart usages for Billboardjapanhot100
Singlechart usages for Scotland
Singlechart usages for Slovakia
Singlechart usages for Spain
Singlechart usages for UKrandb
Singlechart usages for Billboardadultpopsongs
Singlechart usages for Billboarddanceclubplay
Singlechart usages for Billboardpopsongs
Singlechart usages for Billboardrhythmic
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Article
Talk
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Contents
Featured content
Current events
Random article
Donate to Wikipedia
Wikipedia store
Interaction
Help
About Wikipedia
Community portal
Recent changes
Contact page
Tools
What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Wikidata item
Cite this page
Print/export
Create a book
Download as PDF
Printable version
Languages
Deutsch
Español
Français
Bahasa Indonesia
Italiano
Nederlands
日本語
Polski
Português
Русский
Svenska
Tagalog
Українська
Edit links
This page was last edited on 21 January 2018, at 12:11.
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
Privacy policy
About Wikipedia
Disclaimers
Contact Wikipedia
Developers
Cookie statement
Mobile view
Enable previews

key: html

type: local

value: div

attrs: id class

values: mw-page-base noprint

values: mw-head-base noprint

value: a

attrs: href title

values: This article is semi-protected until April 8, 2019.

attrs: id class lang

values: firstHeading firstHeading en

values: siteSub noprint

values: jump-to-nav mw-jump

value: i

values: width: 33%; text-align: center; vertical-align: top; padding: .2em .1em .2em 0;

values: width: 33%; text-align: center; vertical-align: top; padding:.2em .1em;

values: width: 33%; text-align: center; vertical-align: top; padding: .2em 0 .2em .1em;

values: background: transparent; width: 100%; min-width: 100%; border-collapse: collapse;

values: width:33%; padding:.2em .1em .2em 0; text-align: center;

values: width:33%; padding:.2em .1em; text-align: center;

values: width:33%; padding:.2em 0 .2em .1em; text-align: center;

values: position: absolute; top: 0px; left: 110px; right: 0px; bottom: 0px; height: 0px; width: 0px;

values: left: 50%; top: 50%; margin-left: -35px; margin-top: -27.5px;

values:
mwPlayerContainer k-player videoHolder
width: 220px; position: relative;

values: File:Foreigner - I Want to Know What Love Is.ogg

values:
/wiki/Wikipedia:Media_help
mw-redirect
Wikipedia:Media help

values:
hlist hlist-separated
font-size: smaller

values:
/wiki/Power_ballad
mw-redirect
Power ballad

values:
/wiki/Hot_Adult_Contemporary_Recurrents
mw-redirect
Hot Adult Contemporary Recurrents

values: position: absolute; left: 0px; top: 0px; text-align: left; font-family:'Times New Roman',serif; font-weight:bold; font-size: large; color: gray;

values: position: absolute; right: 0px; bottom: 0px; text-align: left; font-family:'Times New Roman',serif; font-weight:bold; font-size: large; color: gray;

values: float: left; clear: left; margin: 0.5em 1.4em 0.8em 0; width:33%; padding: 10px; border: 1px solid #aaa; font-size: 88%; background-color: #F9F9F9;

values:
/wiki/Dreamgirls_(musical)
mw-redirect
Dreamgirls (musical)

values:
/wiki/Billboard_magazine
mw-redirect
Billboard magazine

values:
/wiki/Hot_Mainstream_Rock_Tracks
mw-redirect
Hot Mainstream Rock Tracks

values:
/wiki/Adult_Contemporary
mw-redirect
Adult Contemporary

values: float: right; clear: right; margin: 0.5em 0 0.8em 1.4em; width:33%; padding: 10px; border: 1px solid #aaa; font-size: 88%; background-color: #F9F9F9;

values:
/wiki/Platinum_single
mw-redirect
Platinum single

values:
headerSort
0
columnheader button
Sort ascending

values: Syndicat National de l'Édition Phonographique

values: Federation of the Italian Music Industry

values:
left
headerSort
0
columnheader button
Sort ascending

values:
text-align:center;
headerSort
0
columnheader button
Sort ascending

values:
/wiki/Ultratop_50
mw-redirect
Ultratop 50

values:
/wiki/UK_Singles_Charts
mw-redirect
UK Singles Charts

values:
/wiki/Mainstream_Rock_Tracks
mw-redirect
Mainstream Rock Tracks

values:
col
headerSort
0
columnheader button
Sort ascending

attrs: scope data-sort-type class tabindex role title

values:
col
number
headerSort
0
columnheader button
Sort ascending

values: Recording Industry Association of America

values: wikitable sortable plainrowheaders jquery-tablesorter

values: border-collapse: collapse; padding: 0; border: 0; background:transparent; width:100%;

values: List of UK Singles Chart number ones of the 1980s

values: List of number-one singles and albums in Sweden

values:
/wiki/USA_for_Africa
mw-redirect
USA for Africa

values: List of Hot 100 number-one singles of 1985 (U.S.)

values:
/wiki/Cash_Box_Top_100
mw-redirect
Cash Box Top 100

values: List of Cash Box Top 100 number-one singles of 1985

values: List of number-one singles in Australia during the 1980s

values: List of number-one singles in 1985 (New Zealand)

values:
/wiki/Neutron_Dance_(song)
mw-redirect
Neutron Dance (song)

values:
/wiki/Pointer_Sisters
mw-redirect
Pointer Sisters

values: wikitable succession-box collapsible autocollapse

values: margin: 0 auto 0 auto; font-size:95%;clear:both;

values:
/wiki/Prelude_Records
mw-redirect
Prelude Records

values: Tina Arena - I Want to Know What Love Is.jpg

values:
/wiki/Mick_Jones_(Foreigner)
mw-redirect
Mick Jones (Foreigner)

values: Associação Brasileira dos Produtores de Discos

values: I Want to Know What Love Is - Wynonna.jpg

values: What the World Needs Now Is Love (album)

values: div-col columns column-count column-count-2

values: -moz-column-count: 2; -webkit-column-count: 2; column-count: 2;

values:
/wiki/Hot_Dance_Club_Songs
mw-redirect
Hot Dance Club Songs

attrs: alt src width height class data-file-width data-file-height

values: Mariah Carey - I Want to Know What Love Is.jpg

values:
/wiki/Compact_Disc_single
mw-redirect
Compact Disc single

values:
/wiki/Live_At_The_Pearl
mw-redirect
Live At The Pearl

values:
/wiki/X_Factor_(Italy)
mw-redirect
X Factor (Italy)

values:
/wiki/Touch_My_Body_(Mariah_Carey_song)
mw-redirect
Touch My Body (Mariah Carey song)

values:
/wiki/Japan_Hot_100
mw-redirect
Japan Hot 100

values: International Federation of the Phonographic Industry

values:
/wiki/UK_R%26B_Chart
mw-redirect
UK R&B Chart

values:
/wiki/Halo_(Beyonc%C3%A9_Knowles_song)
mw-redirect
Halo (Beyoncé Knowles song)

values:
/wiki/Beyonc%C3%A9_Knowles
mw-redirect
Beyoncé Knowles

values:
/wiki/Billboard_Brazil
mw-redirect
Billboard Brazil

values: List of Hot 100 number-one singles of 2009 (Brazil)

values:
/wiki/Zez%C3%A9_Di_Camargo_e_Luciano
mw-redirect
Zezé Di Camargo e Luciano

values:
/wiki/Green_River_killer
mw-redirect
Green River killer

values: List of Billboard Hot 100 number-one singles of 1985

values: Category:CS1 maint: BOT: original-url status unknown

values:
nofollow
https://www.bpi.co.uk/bpi-awards/
external text

values:
nofollow
external text
http://www.radio2.be/top-30/1985/02/16

values:
nofollow
external text
https://www.top40.nl/top40/1985/week-7

values:
nofollow
external text
http://nztop40.co.nz/chart/?chart=3874

values:
nofollow
external text
http://asdfg-menezes.org/bookBR.pdf

values:
nofollow
external text
http://www.rhymeandreason.com.au/?p=941

values:
nofollow
external text
http://www.lvrj.com/neon/58935592.html

values:
nofollow
external text
http://www.mariahcarey.com

values:
nofollow
external text
https://www.amazon.co.uk/dp/B002WXYLNU

values:
nofollow
external text
https://www.amazon.co.uk/dp/B002T972I8

values:
/wiki/Canciones_Top_50
mw-redirect
Canciones Top 50

values:
nofollow
external text
https://www.amazon.fr/dp/B002VVI50S

values:
nofollow
external text
https://www.amazon.de/dp/B002NV02U2

values: -moz-column-width: 30em; -webkit-column-width: 30em; column-width: 30em; list-style-type: decimal;

values:
Foreigner
fn org
font-size:114%;margin:0 4em

values:
navbox-abovebelow
2
background: #EEEEEE;

values:
row
navbox-group
width:1%;background: #EEEEEE;

values: Complete Greatest Hits (Foreigner album)

values: The Definitive Collection (Foreigner album)

values: No End in Sight: The Very Best of Foreigner

values: Feels Like the First Time (Foreigner song)

values:
/wiki/Revenge_of_the_Mooninites
mw-redirect
Revenge of the Mooninites

attrs: alt src title width height srcset data-file-width data-file-height

values: nowraplinks vcard hlist collapsible autocollapse navbox-inner

values:
Tina_Arena_singles
fn
font-size:114%;margin:0 4em

values: Tu aurais dû me dire (Oser parler d'amour)

values: nowraplinks vcard collapsible autocollapse navbox-inner

values:
Wynonna_Judd
fn
font-size:114%;margin:0 4em

values: A Classic Christmas (Wynonna Judd album)

values:
Mariah_Carey_songs
fn
font-size:114%;margin:0 4em

values: Theme from Mahogany (Do You Know Where You're Going To)

values: Against All Odds (Take a Look at Me Now)

values: So Lonely (Twista and Mariah Carey song)

values: Category:Billboard Hot 100 number-one singles

values: Category:Billboard Mainstream Rock number-one singles

values: Category:Brasil Hot 100 Airplay number-one singles

values: Category:Brasil Hot Pop number-one singles

values: Category:Music videos directed by Hype Williams

values: Category:Number-one singles in Australia

values: Category:RPM Top Singles number-one singles

values: Category:Songs written by Mick Jones (Foreigner)

values: Category:UK Singles Chart number-one singles

values: Category:Song recordings produced by Narada Michael Walden

values: Category:Song recordings produced by Tricky Stewart

values: Category:CS1 Dutch-language sources (nl)

values: Category:CS1 German-language sources (de)

values: Category:All articles with dead external links

values: Category:Articles with dead external links from September 2017

values: Category:Articles with permanently dead external links

values: Category:CS1 French-language sources (fr)

values: Category:Articles with dead external links from June 2016

values: Category:CS1 Portuguese-language sources (pt)

values: Category:CS1 Korean-language sources (ko)

values: Category:Articles with hAudio microformats

values: Category:Singlechart usages for Flanders

values: Category:Singlechart usages for Canadaadultcontemporary

values: Category:Singlechart called without artist

values: Category:Singlechart called without song

values: Category:Singlechart usages for Canadatopsingles

values: Category:Singlechart usages for Germany2

values: Category:Singlechart usages for Ireland2

values: Category:Singlechart usages for Dutch100

values: Category:Singlechart usages for New Zealand

values: Category:Singlechart usages for Switzerland

values: Category:Singlechart usages for UKchartstats

values: Category:Singlechart usages for Billboardhot100

values: Category:Singlechart usages for Billboardmainstreamrock

values: Category:Singlechart usages for Billboardadultcontemporary

values: Category:Singlechart usages for Billboardrandbhiphop

values: Category:Certification Table Entry usages for United Kingdom

values: Category:Certification Table Entry usages for United States

values: Category:Singlechart usages for Australia

values: Category:Singlechart usages for Belgium (Wallonia)

values: Category:Certification Table Entry usages for France

values: Category:Pages using div col without cols and colwidth parameters

values: Category:Singlechart usages for Belgium (Wallonia) Tip

values: Category:Singlechart usages for Billboardcanadianhot100

values: Category:Singlechart usages for Billboardeuropeanhot100

values: Category:Singlechart usages for Billboardjapanhot100

values: Category:Singlechart usages for Scotland

values: Category:Singlechart usages for Slovakia

values: Category:Singlechart usages for Billboardadultpopsongs

values: Category:Singlechart usages for Billboarddanceclubplay

values: Category:Singlechart usages for Billboardpopsongs

values: Category:Singlechart usages for Billboardrhythmic

values: Discussion about edits from this IP address [ctrl-alt-n]

values: A list of edits made from this IP address [ctrl-alt-y]

values: You are encouraged to create an account and log in; however, it is not mandatory

values: You're encouraged to log in; however, it's not mandatory. [ctrl-alt-o]

values:
/wiki/I_Want_to_Know_What_Love_Is
View the content page [ctrl-alt-c]
c

values: Discussion about the content page [ctrl-alt-t]

values: p-namespaces navigation vectorTabs p-namespaces-label

values:
p-variants
navigation
vectorMenu emptyPortlet
p-variants-label

values:
This page is protected.
You can view its source [ctrl-alt-e]

values: Past revisions of this page [ctrl-alt-h]

values: p-views navigation vectorTabs p-views-label

values:
p-cactions
navigation
vectorMenu emptyPortlet
p-cactions-label

values:
mw-wiki-logo
/wiki/Main_Page
Visit the main page

values:
/wiki/Main_Page
Visit the main page [ctrl-alt-z]
z

values: Recent changes in pages linked from this page [ctrl-alt-k]

values:
/wiki/Wikipedia:File_Upload_Wizard
Upload files [ctrl-alt-u]
u

values: A list of all special pages [ctrl-alt-q]

values: Permanent link to this revision of the page

values: Link to connected data repository item [ctrl-alt-g]

values: Printable version of this page [ctrl-alt-p]

values: I Want To Know What Love Is – Indonesian

values: アイ・ウォナ・ノウ – Japanese

values: I Want to Know What Love Is – Portuguese

values: mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-I_Want_to_Know_What_Love_Is rootpage-I_Want_to_Know_What_Love_Is skin-vector action-view


text:
Conditional (computer programming)
From Wikipedia, the free encyclopedia
Jump to: navigation, search
If-Then-Else flow diagram
A nested "If–Then–Else" flow diagram
In computer science, conditional statements, conditional expressions and conditional constructs are features of a programming language, which perform different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false. Apart from the case of branch predication, this is always achieved by selectively altering the control flow based on some condition.
In imperative programming languages, the term "conditional statement" is usually used, whereas in functional programming, the terms "conditional expression" or "conditional construct" are preferred, because these terms all have distinct meanings.
A conditional is sometimes colloquially referred to as an "if-check," especially when perceived as a simple one and when its specific form is irrelevant or unknown.
Although dynamic dispatch is not usually classified as a conditional construct, it is another way to select between alternatives at runtime.
Contents
[hide]
1 If–then(–else)
1.1 Else if
1.2 If–then–else expressions
1.2.1 Algol family
1.2.2 Lisp dialects
1.2.3 Haskell
1.2.4 C-like languages
1.2.5 In Small Basic
1.2.6 In Visual Basic
1.3 Arithmetic if
1.4 Object-oriented implementation in Smalltalk
1.5 JavaScript
2 Lambda Calculus
3 Case and switch statements
4 Pattern matching
5 Hash-based conditionals
6 Predication
7 Choice system cross reference
8 See also
9 References
10 External links
If–then(–else)[edit]
"if-then-else" redirects here. For the album, see if_then_else.
The if–then construct (sometimes called if–then–else) is common across many programming languages. Although the syntax varies from language to language, the basic structure (in pseudocode form) looks like this:
If (boolean condition) Then (consequent) Else (alternative) End If
In the example code above, the part represented by (boolean condition) constitutes a conditional expression, having intrinsic value (e.g., it may be substituted by either of the values True or False) but having no intrinsic meaning. In contrast, the combination of this expression, the If and Then surrounding it, and the consequent that follows afterward constitute a conditional statement, having intrinsic meaning (e.g., expressing a coherent logical rule) but no intrinsic value.
When an interpreter finds an If, it expects a boolean condition – for example, x > 0, which means "the variable x contains a number that is greater than zero" – and evaluates that condition. If the condition is true, the statements following the then are executed. Otherwise, the execution continues in the following branch – either in the else block (which is usually optional), or if there is no else branch, then after the end If.
After either branch has been executed, control returns to the point after the end If.
In early programming languages, especially some dialects of BASIC in the 1980s home computers, an if–then statement could only contain GOTO statements. This led to a hard-to-read style of programming known as spaghetti programming, with programs in this style called spaghetti code. As a result, structured programming, which allows (virtually) arbitrary statements to be put in statement blocks inside an if statement, gained in popularity, until it became the norm even in most BASIC programming circles. Such mechanisms and principles were based on the older but more advanced ALGOL family of languages, and ALGOL-like languages such as Pascal and Modula-2 influenced modern BASIC variants for many years. While it is possible while using only GOTO statements in if–then statements to write programs that are not spaghetti code and are just as well structured and readable as programs written in a structured programming language, structured programming makes this easier and enforces it. Structured if–then–else statements like the example above are one of the key elements of structured programming, and they are present in most popular high-level programming languages such as C, Java, JavaScript and Visual Basic .
A subtlety is that the optional else clause found in many languages means that the context-free grammar is ambiguous, since nested conditionals can be parsed in multiple ways. Specifically,
if a then if b then s else s2

can be parsed as
if a then (if b then s) else s2

or
if a then (if b then s else s2)

depending on whether the else is associated with the first if or second if. This is known as the dangling else problem, and is resolved in various ways, depending on the language.
Else if[edit]
By using else if, it is possible to combine several conditions. Only the statements following the first condition that is found to be true will be executed. All other statements will be skipped. The statements of
if condition then --statements elseif condition then -- more statements elseif condition then -- more statements; ... else -- other statements; end if;
elseif, in Ada, is simply syntactic sugar for else followed by if. In Ada, the difference is that only one end if is needed, if one uses elseif instead of else followed by if. This is similar in Perl, which provides the keyword elsif to avoid the large number of braces that would be required by multiple if and else statements and also in Python, which uses the special keyword elif because structure is denoted by indentation rather than braces, so a repeated use of else and if would require increased indentation after every condition. Similarly, the earlier UNIX shells (later gathered up to the POSIX shell syntax[1]) use elif too, but giving the choice of delimiting with spaces, line breaks, or both.
However, in many languages more directly descended from Algol, such as Algol68, Simula, Pascal, BCPL and C, this special syntax for the else if construct is not present, nor is it present in the many syntactical derivatives of C, such as Java, ECMA-script, PHP, and so on. This works because in these languages, any single statement (in this case if cond...) can follow a conditional without being enclosed in a block.
This design choice has a slight "cost" in that code else if branch is, effectively, adding an extra nesting level, complicating the job for some compilers (or its implementors), which has to analyse and implement arbitrarily long else if chains recursively.
If all terms in the sequence of conditionals are testing the value of a single expression (e.g., if x=0 ... else if x=1 ... else if x=2...), then an alternative is the switch statement, also called case-statement or select-statement. Conversely, in languages that do not have a switch statement, these can be produced by a sequence of else if statements.
If–then–else expressions[edit]
Many languages support if expressions, which are similar to if statements, but return a value as a result. Thus, they are true expressions (which evaluate to a value), not statements (which changes the program state or perform some kind of action).
Algol family[edit]
ALGOL 60 and some other members of the ALGOL family allow if–then–else as an expression:
  myvariable := if x > 10 then 1 else 2

Lisp dialects[edit]
In dialects of Lisp – Scheme, Racket and Common Lisp – the first of which was inspired to a great extent by ALGOL:
;; Scheme (define myvariable (if (> x 12) 1 2)) ; Assigns 'myvariable' to 1 or 2, depending on the value of 'x'
;; Common Lisp (let ((x 10)) (setq myvariable (if (> x 12) 2 4))) ; Assigns 'myvariable' to 2
Haskell[edit]
In Haskell 98, there is only an if expression, no if statement, and the else part is compulsory, as every expression must have some value.[2] Logic that would be expressed with conditionals in other languages is usually expressed with pattern matching in recursive functions.
Because Haskell is lazy, it is possible to write control structures, such as if, as ordinary expressions; the lazy evaluation means that an if function can evaluate only the condition and proper branch (where a strict language would evaluate all three). It can be written like this:[3]
if' :: Bool -> a -> a -> a if' True x _ = x if' False _ y = y
C-like languages[edit]
C and C-like languages have a special ternary operator (?:) for conditional expressions with a function that may be described by a template like this:
condition ? evaluated-when-true : evaluated-when-false

This means that it can be inlined into expressions, unlike if-statements, in C-like languages:
my_variable = (x > 10) ? "foo" : "bar"; // In C-like languages
which can be compared to the Algol-family if–then–else expressions (and similar in Ruby and Scala, among others).
To accomplish the same using an if-statement, this would take more than one line of code (under typical layout conventions):
if (x > 10) my_variable = 'foo'; else my_variable = 'bar';
Some argue that the explicit if/then statement is easier to read and that it may compile to more efficient code than the ternary operator,[4] while others argue that concise expressions are easier to read than statements spread over several lines.
In Small Basic[edit]
x = TextWindow.ReadNumber() If (x > 10) Then TextWindow.WriteLine("My variable is named 'foo'.") Else TextWindow.WriteLine("My variable is named 'bar'.") EndIf
First, when the user runs the program, a cursor appears waiting for the reader to type a number. If that number is greater than 10, the text "My variable is named 'foo'." is displayed on the screen. If the number is smaller than 10, then the message "My variable is named 'bar'." is printed on the screen.
In Visual Basic[edit]
In Visual Basic and some other languages, a function called IIf is provided, which can be used as a conditional expression. However, it does not behave like a true conditional expression, because both the true and false branches are always evaluated; it is just that the result of one of them is thrown away, while the result of the other is returned by the IIf function.
Arithmetic if[edit]
Up to Fortran 77, the language Fortran has an "arithmetic if" statement which is halfway between a computed IF and a case statement, based on the trichotomy x < 0, x = 0, x > 0. This was the earliest conditional statement in Fortran:[5]
IF (e) label1, label2, label3
Where e is any numeric expression (not necessarily an integer); this is equivalent to
IF (e .LT. 0) GOTO label1 IF (e .EQ. 0) GOTO label2 GOTO label3
Because this arithmetic IF is equivalent to multiple GOTO statements that could jump to anywhere, it is considered to be an unstructured control statement, and should not be used if more structured statements can be used. In practice it has been observed that most arithmetic IF statements referenced the following statement with one or two of the labels.
This was the only conditional control statement in the original implementation of Fortran on the IBM 704 computer. On that computer the test-and-branch op-code had three addresses for those three states. Other computers would have "flag" registers such as positive, zero, negative, even, overflow, carry, associated with the last arithmetic operations and would use instructions such as 'Branch if accumulator negative' then 'Branch if accumulator zero' or similar. Note that the expression is evaluated once only, and in cases such as integer arithmetic where overflow may occur, the overflow or carry flags would be considered also.
Object-oriented implementation in Smalltalk[edit]
In contrast to other languages, in Smalltalk the conditional statement is not a language construct but defined in the class Boolean as an abstract method that takes two parameters, both closures. Boolean has two subclasses, True and False, which both define the method, True executing the first closure only, False executing the second closure only.[6]
var = condition ifTrue: [ 'foo' ] ifFalse: [ 'bar' ]
JavaScript[edit]
Two examples in JavaScript:
if (Math.random() < 0.5) { console.log("You got Heads!"); } else { console.log("You got Tails!"); }
var x = Math.random(); if (x < 1/3) { console.log("One person won!"); } else if (x < 2/3) { console.log("Two people won!"); } else { console.log("It's a three-way tie!"); }
Lambda Calculus[edit]
In Lambda Calculus, the concept of an if-then-else conditional can be expressed using the expressions:
true = λx. λy. x
false = λx. λy. y
ifThenElse = (λc. λx. λy. (c x y))

true takes up to two arguments and once both are provided(see currying), it returns the first argument given.
false takes up to two arguments and once both are provided(see currying), it returns the second argument given.
ifThenElse takes up to three arguments and once all are provided, it passes both second and third argument to the first argument(which is a function that given two arguments, and produces a result). We expect ifThenElse to only take true or false as an argument, both of which project the given two arguments to their preferred single argument, which is then returned.
note: if ifThenElse is passed two functions as the left and right conditionals; it is necessary to also pass an empty tuple () to the result of ifThenElse in order to actually call the chosen function, otherwise ifThenElse will just return the function object without getting called.
In a system where numbers can be used without definition(like Lisp, Traditional paper math, so on), the above can be expressed as a single closure below:
((λtrue. λfalse. λifThenElse.
    (ifThenElse true 2 3)
)(λx. λy. x)(λx. λy. y)(λc. λl. λr. c l r))

Here, true, false, and ifThenElse are bound to their respective definitions which are passed to their scope at the end of their block.
A working JavaScript analogy(using only functions of single variable for rigor) to this is:
var computationResult = ((_true => _false => _ifThenElse =>
    _ifThenElse(_true)(2)(3)
)(x => y => x)(x => y => y)(c => x => y => c(x)(y)));

The code above with multivariable functions looks like this:
var computationResult = ((_true, _false, _ifThenElse) =>
    _ifThenElse(_true, 2, 3)
)((x, y) => x, (x, y) => y, (c, x, y) => c(x, y));

another version of the earlier example without a system where numbers are assumed is below.
First example shows the first branch being taken, while second example shows the second branch being taken.
((λtrue. λfalse. λifThenElse.
    (ifThenElse true (λFirstBranch. FirstBranch) (λSecondBranch. SecondBranch))
)(λx. λy. x)(λx. λy. y)(λc. λl. λr. c l r))

((λtrue. λfalse. λifThenElse.
    (ifThenElse false (λFirstBranch. FirstBranch) (λSecondBranch. SecondBranch))
)(λx. λy. x)(λx. λy. y)(λc. λl. λr. c l r))

Smalltalk uses a similar idea for its true and false representations, with True and False being singleton objects that respond to messages ifTrue/ifFalse differently.
Haskell used to use this exact model for its Boolean type, but at the time of writing, most Haskell programs use syntactic sugar "if a then b else c" construct which unlike ifThenElse does not compose unless
either wrapped in another function or re-implemented as shown in The Haskell section of this page.
Case and switch statements[edit]
Main article: Switch statement
Switch statements (in some languages, case statements or multiway branches) compare a given value with specified constants and take action according to the first constant to match. There is usually a provision for a default action ('else','otherwise') to be taken if no match succeeds. Switch statements can allow compiler optimizations, such as lookup tables. In dynamic languages, the cases may not be limited to constant expressions, and might extend to pattern matching, as in the shell script example on the right, where the '*)' implements the default case as a regular expression matching any string.
Pascal:
C:
Shell script:
case someChar of 'a': actionOnA; 'x': actionOnX; 'y','z':actionOnYandZ; else actionOnNoMatch; end;
switch (someChar) { case 'a': actionOnA; break; case 'x': actionOnX; break; case 'y': case 'z': actionOnYandZ; break; default: actionOnNoMatch; }
case $someChar in a) actionOnA; ;; x) actionOnX; ;; [yz]) actionOnYandZ; ;; *) actionOnNoMatch ;; esac
Pattern matching[edit]
Main article: Pattern matching
Pattern matching may be seen as a more sophisticated alternative to both if–then–else, and case statements. It is available in many programming languages with functional programming features, such as Wolfram Language, ML and many others. Here is a simple example written in the OCaml language:
match fruit with | "apple" -> cook pie | "coconut" -> cook dango_mochi | "banana" -> mix;;
The power of pattern matching is the ability to concisely match not only actions but also values to patterns of data. Here is an example written in Haskell which illustrates both of these features:
map _ [] = [] map f (h : t) = f h : map f t
This code defines a function map, which applies the first argument (a function) to each of the elements of the second argument (a list), and returns the resulting list. The two lines are the two definitions of the function for the two kinds of arguments possible in this case – one where the list is empty (just return an empty list) and the other case where the list is not empty.
Pattern matching is not strictly speaking always a choice construct, because it is possible in Haskell to write only one alternative, which is guaranteed to always be matched – in this situation, it is not being used as a choice construct, but simply as a way to bind names to values. However, it is frequently used as a choice construct in the languages in which it is available.
Hash-based conditionals[edit]
In programming languages that have associative arrays or comparable data structures, such as Python, Perl, PHP or Objective-C, it is idiomatic to use them to implement conditional assignment.[7]
pet = raw_input("Enter the type of pet you want to name: ") known_pets = { "Dog": "Fido", "Cat": "Meowsles", "Bird": "Tweety", } my_name = known_pets[pet]
In languages that have anonymous functions or that allow a programmer to assign a named function to a variable reference, conditional flow can be implemented by using a hash as a dispatch table.
Predication[edit]
Main article: Branch predication
An alternative to conditional branch instructions is predication. Predication is an architectural feature that enables instructions to be conditionally executed instead of modifying the control flow.
Choice system cross reference[edit]
This table refers to the most recent language specification of each language. For languages that do not have a specification, the latest officially released implementation is referred to.
Programming language
Structured if
switch–select–case
Arithmetic if
Pattern matching[A]
then
else
else–if
Ada Yes Yes Yes Yes No No
C, C++ Yes Yes Unneeded[B] Fall-through No No
C# Yes Yes Unneeded[B] Yes No No
COBOL Yes Yes Unneeded[B] Yes No No
Eiffel Yes Yes Yes Yes No No
F# Yes Yes Yes Unneeded[C] No Yes
Fortran 90 Yes Yes Yes Yes Yes[F] No
Go Yes Yes Unneeded[B] Yes No No
Haskell Yes Needed Unneeded[B] Yes, but unneeded[C] No Yes
Java Yes Yes Unneeded[B] Fall-through[8] No No
ECMAScript (JavaScript) Yes Yes Unneeded[B] Fall-through[9] No No
Mathematica Yes Yes Yes Yes No Yes
Oberon Yes Yes Yes Yes No No
Perl Yes Yes Yes Yes No No
PHP Yes Yes Yes Fall-through No No
Pascal, Object Pascal (Delphi) Yes Yes Unneeded Yes No No
Python Yes Yes Yes No No No
QuickBASIC Yes Yes Yes Yes No No
Ruby Yes Yes Yes Yes No No
Scala Yes Yes Unneeded[B] Fall-through[citation needed] No Yes
SQL Yes[S] Yes Yes Yes[S] No No
Swift Yes Yes Yes Yes No Yes
Visual Basic, classic Yes Yes Yes Yes No No
Visual Basic .NET Yes Yes Yes Yes No No
Windows PowerShell Yes Yes Yes Fall-through No No
^ This refers to pattern matching as a distinct conditional construct in the programming language – as opposed to mere string pattern matching support, such as regular expression support.
1 2 3 4 5 The often-encountered else if in the C family of languages, and in COBOL and Haskell, is not a language feature but a set of nested and independent if then else statements combined with a particular source code layout. However, this also means that a distinct else–if construct is not really needed in these languages.
1 2 In Haskell and F#, a separate constant choice construct is unneeded, because the same task can be done with pattern matching.
^ In a Ruby case construct, regular expression matching is among the conditional flow-control alternatives available. For an example, see this Stack Overflow question.
1 2 SQL has two similar constructs that fulfill both roles, both introduced in SQL-92. A "searched CASE" expression CASE WHEN cond1 THEN expr1 WHEN cond2 THEN expr2 [...] ELSE exprDflt END works like if ... else if ... else, whereas a "simple CASE" expression: CASE expr WHEN val1 THEN expr1 [...] ELSE exprDflt END works like a switch statement. For details and examples see Case (SQL).
^ Arithmetic if is obsolescent in Fortran 90.
See also[edit]
Branch (computer science)
Conditional compilation
Dynamic dispatch for another way to make execution choices
McCarthy Formalism for history and historical references
Named condition
Test (Unix)
Yoda conditions
Conditional move
References[edit]
Jump up ^ POSIX standard shell syntax
Jump up ^ Haskell 98 Language and Libraries: The Revised Report
Jump up ^ "If-then-else Proposal on HaskellWiki"
Jump up ^ "Efficient C Tips #6 – Don't use the ternary operator « Stack Overflow". Embeddedgurus.com. 2009-02-18. Retrieved 2012-09-07.
Jump up ^ "American National Standard Programming Language FORTRAN". 1978-04-03. Retrieved 2007-09-09.
Jump up ^ "VisualWorks: Conditional Processing". 2006-12-16. Retrieved 2007-09-09.
Jump up ^ "Pythonic way to implement switch/case statements".
Jump up ^ Java.sun.com, Java Language Specification, 3rd Edition.
Jump up ^ Ecma-international.org ECMAScript Language Specification, 5th Edition.
External links[edit]
Look up then or else in Wiktionary, the free dictionary.
IF NOT (ActionScript 3.0) video
Retrieved from "https://en.wikipedia.org/w/index.php?title=Conditional_(computer_programming)&oldid=831794353"
Categories:
Conditional constructs
Hidden categories:
All articles with unsourced statements
Articles with unsourced statements from November 2015
Articles with example pseudocode
Articles with example C code
Articles with example Pascal code
Articles with example Haskell code
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Article
Talk
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Contents
Featured content
Current events
Random article
Donate to Wikipedia
Wikipedia store
Interaction
Help
About Wikipedia
Community portal
Recent changes
Contact page
Tools
What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Wikidata item
Cite this page
Print/export
Create a book
Download as PDF
Printable version
Languages
العربية
Azərbaycanca
Български
Català
Čeština
Deutsch
Eesti
Español
فارسی
Français
한국어
Hrvatski
עברית
Magyar
日本語
Олык марий
Polski
Português
Русский
Српски / srpski
Svenska
Українська
中文
14 more
Edit links
This page was last edited on 22 March 2018, at 06:39.
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
Privacy policy
About Wikipedia
Disclaimers
Contact Wikipedia
Developers
Cookie statement
Mobile view
Enable previews

values: mw-page-base noprint

values: mw-head-base noprint

values: firstHeading firstHeading en

values: siteSub noprint

values: jump-to-nav mw-jump

value: img

attrs: alt src width height class srcset data-file-width data-file-height

attrs: href class

attrs: href class title

attrs: class style

value: b

values:
/wiki/Boolean_datatype
mw-redirect
Boolean datatype

values:
/wiki/Branch_predication
mw-redirect
Branch predication

values:
/wiki/Statement_(programming)
mw-redirect
Statement (programming)

values:
/wiki/Expression_(programming)
mw-redirect
Expression (programming)

values:
/wiki/If_then_else
mw-redirect
If then else

values:
/wiki/Spaghetti_programming
mw-redirect
Spaghetti programming

values:
/wiki/Simula_(programming_language)
mw-redirect
Simula (programming language)

values: BCPL (programming language) (page does not exist)

values:
/wiki/Ternary_operator
mw-redirect
Ternary operator

values:
/wiki/Small_Basic
mw-redirect
Small Basic

values: Edit section: Object-oriented implementation in Smalltalk

values:
/wiki/Closure_(computer_science)
mw-redirect
Closure (computer science)

values: Edit section: Case and switch statements

values: Edit section: Choice system cross reference

values: background: #ececec; color: black; font-weight: bold; vertical-align: middle; text-align: left;

values:
/wiki/Delphi_(programming_language)
mw-redirect
Delphi (programming language)

values: This claim needs references to reliable sources. (November 2015)

values:
noprint Inline-Template Template-Fact
white-space:nowrap;

values:
/wiki/Windows_PowerShell
mw-redirect
Windows PowerShell

values:
/wiki/Named_condition
mw-redirect
Named condition

values:
/wiki/Conditional_move
mw-redirect
Conditional move

values:
nofollow
http://www.haskell.org/onlinereport/
external text

values:
reflist mw-references-wrap
list-style-type: decimal;

values: Category:All articles with unsourced statements

values: Category:Articles with unsourced statements from November 2015

values: Category:Articles with example pseudocode

values: Category:Articles with example Pascal code

values: Category:Articles with example Haskell code

values: Discussion about edits from this IP address [ctrl-alt-n]

values: A list of edits made from this IP address [ctrl-alt-y]

values: You are encouraged to create an account and log in; however, it is not mandatory

values: You're encouraged to log in; however, it's not mandatory. [ctrl-alt-o]

values: Discussion about the content page [ctrl-alt-t]

values: p-namespaces navigation vectorTabs p-namespaces-label

values: Featured content – the best of Wikipedia

values: Find background information on current events

values:
/wiki/Special:Random
Load a random article [ctrl-alt-x]
x

values: portal navigation p-navigation p-navigation-label

values: Guidance on how to use and edit Wikipedia

values: About the project, what you can do, where to find things

values: A list of recent changes in the wiki [ctrl-alt-r]

values: portal navigation p-interaction p-interaction-label

values: List of all English Wikipedia pages containing links to this page [ctrl-alt-j]

values: تعبير شرطي (برمجة الحاسوب) – Arabic

values:
interlanguage-link interwiki-az
display: none;

values: Условна конструкция (програмиране) – Bulgarian

values:
interlanguage-link interwiki-bg
display: none;

values:
interlanguage-link interwiki-ca
display: none;

values:
interlanguage-link interwiki-cs
display: none;

values:
interlanguage-link interwiki-et
display: none;

values: شرط (برنامه‌نویسی) – Persian

values:
interlanguage-link interwiki-fa
display: none;

values: Instruction conditionnelle (programmation) – French

values:
interlanguage-link interwiki-hr
display: none;

values: פקודת תנאי – Hebrew

values:
interlanguage-link interwiki-he
display: none;

values:
interlanguage-link interwiki-hu
display: none;

values:
interlanguage-link interwiki-mhr
display: none;

values:
interlanguage-link interwiki-pl
display: none;

values: Ветвление (программирование) – Russian

values: Кондиционал (рачунарско програмирање) – Serbian

values:
interlanguage-link interwiki-sr
display: none;

values:
https://sv.wikipedia.org/wiki/If-sats
If-sats – Swedish
sv
sv
interlanguage-link-target

values:
interlanguage-link interwiki-sv
display: none;

values: Умовний перехід – Ukrainian

values:
interlanguage-link interwiki-uk
display: none;

values: All languages (initial selection from common choices by you and others)

values: /static/images/wikimedia-button-1.5x.png 1.5x, /static/images/wikimedia-button-2x.png 2x

values: /static/images/poweredby_mediawiki_132x47.png 1.5x, /static/images/poweredby_mediawiki_176x62.png 2x

values:
suggestions
display: none; font-size: 13px;

values: mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Conditional_computer_programming rootpage-Conditional_computer_programming skin-vector action-view