INTERCAL

INTERCAL
linguaggio di programmazione
Codice che stampa 'Hello world!' in INTERCAL
AutoreDon Woods e James Lyon
Data di origine1973
Ultima versione0.30 (2 aprile 2015)
Paradigmiesoterico, imperativo
Tipizzazioneforte
Implementazione di riferimento
Sito webwww.catb.org/~esr/intercal/

INTERCAL (sigla per Compiler Language With No Pronounceable Acronym) è stato il primo linguaggio di programmazione esoterico, sviluppato nel 1972 da Don Woods e James Lyon come parodia degli altri linguaggi di programmazione dell'epoca come FORTRAN, BASIC e ALGOL.[1][2][3][4] Tra gli elementi esoterici di questo linguaggio vi sono degli errori che occorrono se il programmatore non è abbastanza o è troppo gentile e la presenza in alcune sue varianti dell'istruzione COMEFROM, inverso della deprecata GOTO.[5]

Storia

INTERCAL è stato sviluppato nel 1972 da due studenti dell'Università di Princeton, Don Woods e James Lyon.[1][2][3][4]

La versione iniziale del linguaggio sviluppata all'Università di Princeton funzionava mediante schede perforate con un sistema di codifica EBCDIC.[6]

Venne successivamente sviluppata una versione per computer moderni, detta implementazione Atari, che utilizza il sistema di codifica ASCII e di conseguenza sostituisce alcuni caratteri.[7]

Descrizione

Nella sua sintassi più minimale, il linguaggio prevede che ogni istruzione, su singola riga, sia preceduta dall'identificatore DO, PLEASE DO o PLEASE.[3][8]

Le variabili non devono essere dichiarate, possono avere nomi solamente numerici e possono essere di diversi tipi (numeri interi in 16 bit, numeri interi in 32 bit, array di numeri interi in 16 bit o array di numeri interi in 32 bit). Ogni tipo possiede un identificatore differente (rispettivamente ., :, ,, ;). Il valore viene assegnato alle variabili mediante l'operatore <-. L'input avviene attraverso WRITE IN e l'output attraverso READ OUT.[3][9]

Il compilatore restituisce un errore se PLEASE (in italiano, "perfavore") appare meno di 4 o più di 5 volte, perché il programmatore è stato poco o eccessivamente gentile.[3][5]

Per terminare un programma è necessario usare PLEASE GIVE UP (in italiano, "perfavore arrenditi").[3][9]

Esempio

DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #108
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
DO ,1 SUB #7 <- #48
PLEASE DO ,1 SUB #8 <- #22
DO ,1 SUB #9 <- #248
PLEASE DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
DO ,1 SUB #13 <- #162
PLEASE READ OUT ,1
PLEASE GIVE UP

Questo esempio stampa a schermo "Hello world!".[5]

Note

  1. ^ a b (EN) INTERCAL, su DevX. URL consultato l'11 marzo 2024.
  2. ^ a b (EN) INTERCAL, su techopedia.com.
  3. ^ a b c d e f (EN) INTERCAL (PDF), su cs.uky.edu.
  4. ^ a b Woods, p. 1.
  5. ^ a b c (EN) Vitaliy Mokosiy, Weird programming languages, su Medium, 17 luglio 2017. URL consultato l'11 marzo 2024.
  6. ^ Woods, p. 5.
  7. ^ Woods, p. 19.
  8. ^ Woods, p. 6.
  9. ^ a b Woods, p. 9.

Bibliografia

Altri progetti

  Portale Informatica: accedi alle voci di Wikipedia che trattano di Informatica

Read other articles:

Dr. Ir. Surfa Yondri, S.T., S.S.T., M.Kom. (lahir 9 Juni 1970) adalah seorang dosen dan akademisi vokasi teknik Indonesia yang menjabat Direktur Politeknik Negeri Padang (PNP) sejak 2017. Pendidikan Surfa Yondri dilahirkan di Supayang, Salimpaung, Tanah Datar, Sumatera Barat pada 9 Juni 1970. Ia menamatkan pendidikan D-3 Teknik Elektro di Politeknik Engineering Universitas Andalas (kini PNP).[1] Semasa berkuliah ia tercatat aktif sebagai Ketua Himpunan Mahasiswa Teknik Listrik (1990�...

 

Relief Bartolomeo Montagna Bartolomeo Montagna (lahir di Orzinovi, Italia, kurang lebih tahun 1450 - meninggal di Vicenza, 11 Oktober 1523) adalah seorang pelukis Italia ketika awal Abad Renaisans.[1] Dia juga menjadi master pelukis paling terkemula dari sekolah di Vicenza.[2] Ia merupakan murid dari Andrea Mantegna sehingga gaya lukisan Mantegna sangat berpengaruh dalam lukisan Montagna.[2] Namun gaya lukisan Montagna juga dipengaruhi dari seniman Venisia di bawah pen...

 

Academy Awards ke-53TanggalSelasa, 31 Maret 1981TempatDorothy Chandler Pavilion, Los AngelesPembawa acaraJohnny CarsonProduserNorman JewisonPengarah acaraMarty PasettaSorotanFilm TerbaikOrdinary PeoplePenghargaan terbanyakOrdinary People (4)Nominasi terbanyakThe Elephant Man dan Raging Bull (8)Liputan televisiJaringanABCDurasi3 jam, 13 menit ← ke-52 Academy Awards ke-54 → Academy Awards ke-53, yang memberikan penghargaan kepada film-film pada 1980, diadakan pada 31 Maret...

Monument in Gisborne, New Zealand Puhi Kai Iti / Cook Landing National Historic Reserve1906 monument in the historic reserve to Cook's landingLocation of Puhi Kai Iti / Cook Landing National Historic Reserve in New ZealandNearest cityGisborneCoordinates38°40′31″S 178°01′32″E / 38.6754°S 178.0256°E / -38.6754; 178.0256Established1990[1]AdministratorDepartment of Conservation Heritage New Zealand – Category 1Designated15 February 1990Refer...

 

HistadrutNama lengkapFederasi Umum Pekerja di IsraelNama asliההסתדרות הכללית של העובדים בארץ ישראלHaHistadrut HaKlalit shel HaOvdim B'Eretz YisraelBerdiri1920; 104 tahun lalu (1920)Anggota800.000AfiliasiITUCSitus webwww.histadrut.org.il Histadrut atau Organisasi Pekerja Umum di Israel (Ibrani: ההסתדרות הכללית של העובדים בארץ ישראל, HaHistadrut HaKlalit shel HaOvdim B'Eretz Yisrael) adalah organisasi buruh nasional Israel...

 

Chronologie de la France ◄◄ 1615 1616 1617 1618 1619 1620 1621 1622 1623 ►► Chronologies Arrivée de Christine de France à Turin, toile de Antonio Tempesta.Données clés 1616 1617 1618  1619  1620 1621 1622Décennies :1580 1590 1600  1610  1620 1630 1640Siècles :XVe XVIe  XVIIe  XVIIIe XIXeMillénaires :-Ier Ier  IIe  IIIe Chronologies thématiques Art Architecture, Arts plastiques (Dessin, Gravure, Peinture et Sculpture), Lit...

New Zealand political candidatesin the MMP era 1996   party lists   by electorate 1999   party lists   by electorate 2002   party lists   by electorate 2005   party lists   by electorate 2008   party lists   by electorate 2011   party lists   by electorate 2014   party lists   by electorate 2017   party lists   by electorate 2020   party lists   by electorate 2023   party lists   by electorate...

 

AthenaAthena Varvakeion, patung dari masa Romawi paruh pertama abad ke-3 Masehi. Patung ini adalah replika dari arca berukuran raksasa Athena Parthenos karya Phidias yang pernah berdiri di Parthenon, Akropolis Athena. Ditemukan di Athena dekat sekolah Varvakeion.Dewi kebijaksanaan, perang, strategi[1] Dewi pelindung kota AthenaSimbolBurung hantu, pohon zaitun, ular, laba-laba, Aigis, baju perang, helm perang, tombakOrang tuaZeus sendirian dalam Iliad Zeus dan Metis dalam TheogonySaud...

 

Skieurs à Cypress Mountain. Cypress Mountain est une aire skiable situé à West Vancouver au Canada, dans le parc provincial Cypress. La station de ski se situe à trente minutes de voiture au nord de Vancouver et dispose de 47 pistes de ski alpin et de 19km de ski de fond. Les parcours de raquettes à neige sont également présents. Il s'agit de l'un des sites des compétitions olympiques des Jeux olympiques d'hiver de 2010 puisque la station accueille les épreuves de ski acrobatique et...

У этого термина существуют и другие значения, см. Актобе (значения). Актобе Полноеназвание АО «Областной Футбольный Клуб «Актобе»[1] Прозвища «красно-белые» Основан 1967; 57 лет назад (1967) Стадион «Центральный стадион имени Кобланды-батыра» Вместимость 12 800[...

 

Chemical compound BrimonidineClinical dataPronunciation/brɪˈmoʊnɪdiːn/ bri-MOH-nid-een Trade namesAlphagan, Mirvaso, Lumify, othersAHFS/Drugs.comMonographMedlinePlusa601232License data US DailyMed: Brimonidine Pregnancycategory AU: B3 Routes ofadministrationTopicalATC codeD11AX21 (WHO) S01EA05 (WHO), S01GA07 (WHO)Legal statusLegal status US: ℞-only / OTC Pharmacokinetic dataMetabolismPrimarily liverElimination half-life3 hours (ocu...

 

العلاقات الدنماركية المولدوفية الدنمارك مولدوفا   الدنمارك   مولدوفا تعديل مصدري - تعديل   العلاقات الدنماركية المولدوفية هي العلاقات الثنائية التي تجمع بين الدنمارك ومولدوفا.[1][2][3][4][5] مقارنة بين البلدين هذه مقارنة عامة ومرجعية للدولتي�...

American politician (1815–1875) This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. Please help improve this article by introducing more precise citations. (February 2013) (Learn how and when to remove this message) José Manuel GallegosMember of the U.S. House of Representativesfrom New Mexico Territory's At-large districtIn officeMarch 4, 1853 – July 23, 1856(Delegate)Prece...

 

2001 film by Ole Christian Madsen This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Kira's Reason: A Love Story – news · newspapers · books · scholar · JSTOR (June 2019) (Learn how and when to remove this message) Kira's Reason: A Love StoryFront cover of the DVDDirected byOle Christian MadsenWritten byOle Chr...

 

Type of needle lace developed in the late 17th century Point de FranceA piece of point de France lace produced between 1700 and 1725TypeLaceProduction methodNeedle laceProduction processCraft productionPlace of originFranceIntroduced17th century Point de France is a type of needle lace developed in the late 17th century.[1][2] It is characterized by rich and symmetrical detail, and a reliance on symbols associated with King Louis XIV of France, such as suns, sunflowers, fleurs...

Pemilihan umum Gubernur Bali 20182013202427 Juni 2018Kehadiran pemilih70,11%Kandidat   Calon I Wayan Koster I. B. Rai Dharmawijaya Mantra Partai PDI-P Partai Golongan Karya Pendamping Tjokorda Oka Artha Ardana Sukawati I Ketut Sudikerta Suara rakyat 1.213.075 889.930 Persentase 57,68% 42,32% Peta persebaran suara Peta Lokasi Bali Gubernur dan Wakil Gubernur petahanaI Made Mangku Pastika dan I Ketut Sudikerta Demokrat Gubernur dan Wakil Gubernur terpilih I Wayan Koster dan Tjokorda ...

 

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (أكتوبر 2023) عملية سكك حديدية تحت الأرض الاختصار O.U.R. المقر الرئيسي Salt Lake City مكان التأسيس سولت ليك (مدينة)، يوتا المؤسس Tim Ballard النوع منظمة غير حكومية، منظمة غير ربحية الاه...

 

Informal term for where a monarch's role is seen as almost entirely ceremonial A 1871 caricature of the French president Adolphe Thiers by Touchatout, alluding to his 1830s defense of the July Monarchy as a “hereditary presidency”. Thiers symbolically replaces the Phrygian cap, a symbol of the French Revolution and especially of jacobinism, with a crown on a personnification of Liberty commonly used as an allegory of the French Republic. Part of the Politics seriesMonarchy Central concept...

1994 U.S. federal law Violent Crime Control and Law Enforcement Act of 1994Long titleAn Act to Control and Prevent CrimeNicknames1994 Crime BillEnacted bythe 103rd United States CongressCitationsPublic lawPub. L.Tooltip Public Law (United States) 103–322Statutes at Large108 Stat. 1796CodificationTitles amended12 U.S.C.: Banks and Banking 18 U.S.C.: Crimes and Criminal Procedure 42 U.S.C.: Public Health and Social WelfareU.S.C. sections created42 U.S.C. ch. 136Legisla...

 

Disambiguazione – Messori rimanda qui. Se stai cercando altri significati, vedi Messori (disambigua). Messori nel suo studio a Desenzano, 2004 Vittorio Messori (Sassuolo, 16 aprile 1941) è un giornalista e scrittore italiano. Autore di numerosi saggi, è considerato uno dei principali autori cattolici italiani[1]. Ha collaborato con La Stampa, Avvenire e Corriere della Sera. Indice 1 Biografia 1.1 Infanzia e gioventù 1.1.1 Studi 1.1.2 Conversione 1.2 Dal 1970 al 1982 1.2....