fbpx
วิกิพีเดีย

ภาษาซิมูลา

ภาษาซิมูลา (Simula) เป็นชื่อเรียกรวมของภาษาโปรแกรมคอมพิวเตอร์ 2 ภาษาคือ ภาษาซิมูลา 1 (Simula 1) และภาษาซิมูลา 67 (Simula 67) ภาษาโปรแกรมดังกล่าวนี้ได้เริ่มพัฒนาขึ้นประมาณปี พ.ศ. 2503 เป็นต้นมาที่ "ศูนย์คอมพิวเตอร์นอร์เวย์" (Norwegian Computing Center) ที่นครออสโลโดย โอล-โยฮาน ดาห์ล และ คริสเตน ไนกาอาร์ด ในเชิงวากยสัมพันธ์ยังนับได้ว่าเป็นชุดภาษาโปรแกรมชุด "อัลกอล 60" (Algol 60) ที่เชื่อถือได้มากที่สุดอยู่

ภาษาซิมูลา 67 แนะให้ใช้วัตถุหรืออ็อบเจกต์ คลาส (class) ซับคลาส (subclasses) เวอร์ชวลเมธอด (virtual method) โครูทีน (coroutine) การกวาดล้างข้อมูลขยะ (garbage collection) และเหตุการณ์จำลองไม่ต่อเนื่อง (discrete event simulation)

ซึ่งซิมูลาได้รับการยอมรับว่าเป็นการเขียนภาษาโปรแกรมเชิงอ็อบเจกต์รุ่นแรกสุด แม้บางครั้งแบบจำลองอ็อบเจกต์อาจไม่สมบูรณ์ ดังที่ชื่อของมันบ่งบอกเป็นนัยอยู่ โปรแกรมซิมูลาได้แรกเริ่มออกแบบมาก็เพื่อการจำลองซึ่งก็ได้มีการใช้เนื้อหาของมันมาเป็นพื้นฐาน หรือกรอบงานสำหรับการออกแบบภาษาโปรแกรมเชิงอ็อบเจกต์ทั้งหลายที่ใช้อยู่ในปัจจุบัน

แม้ในปัจจุบันโปรแกรมซิมูลายังมีการนำมาใช้อยู่อย่างกว้างขวง เช่นการจำลองการออกแบบ VLSI โปรแกรมกระบวนการ (processes) โพรโทคอล ภาษาขั้นตอนวิธี และการประยุกต์อื่นๆ เช่นการเรียงพิมพ์ เรขนิเทศคอมพิวเตอร์และด้านการศึกษา เนื่องจากอ็อบเจกต์เชิงซิมูลาได้ถุกนำมาประยุกต์ซ้ำใน ภาษา C++ อิทธิพลของสิมิลาจึงได้รับการกล่าวถึงความสำคัญน้อยกว่าความเป็นจริง

ประวัติ

โค้ดอย่างง่าย

โปรแกรมอย่างน้อยที่สุด

โปรแกรมอย่างน้อยที่สุด(มินิมัล)ของSimula คือไฟล์ว่างเปล่า ซึ่งมีองค์ประกอบเพียง ; (ดัมมี่สเตทเมนท์) เพียงอย่างเดียว. แต่โปรแกรมอย่างน้อยที่สุดก็มักจะเขียนเป็นบล็อกว่างเปล่าตามความนิยมด้วยเช่นกัน

Begin End; 

โปรแกรมนี้เริ่มรันและจบลงทันที. โดยในภาษาSimulaจะไม่มีการรีเทิร์นค่าเมื่อจบโปรแกรม.

คลาสสิกเฮลโลเวิลด์

โปรแกรมภาษาSimulaแบ่งแยกตัวอักษรเล็กและใหญ่(เคสเซนสิทีฟ) ตัวอย่างต่อไปนี้คือโปรแกรมเฮลโลเวิลด์ในภาษาSimula

Begin OutText ("Hello World!"); Outimage; End; 

ชั้น, ชั้นย่อย, และวิธีการเสมือน

A more realistic example with use of classes, subclasses and virtual methods:

Begin Class Glyph; Virtual: Procedure print Is Procedure print;; Begin End; Glyph Class Char (c); Character c; Begin Procedure print; OutChar(c); End; Glyph Class Line (elements); Ref (Glyph) Array elements; Begin Procedure print; Begin Integer i; For i:= 1 Step 1 Until UpperBound (elements, 1) Do  elements (i).print; OutImage; End; End; Ref (Glyph) rg; Ref (Glyph) Array rgs (1 : 4); ! Main program; rgs (1):- New Char ('A'); rgs (2):- New Char ('b'); rgs (3):- New Char ('b'); rgs (4):- New Char ('a'); rg:- New Line (rgs); rg.print; End; 

อ้างอิง

  • Compiling Simula Early history of the development of Simula by Jan Rune Holmevik
  • IBM System 360/370 Compiler and Historical Documentation The Simula Standard and other historical documentation by Peter Sylvester

ดูเพิ่ม

แหล่งข้อมูลอื่น

  • Introduction to OOP in Simula - By J.Sklenar, based on the 1997 seminar "30 Years of Object Oriented Programming (OOP)" at the U. of Malta
  • How Object-Oriented Programming Started - By Dahl and Nygaard, abbrev. version of an encyclopedia article; on Nygaards home page
  • Simula at the University of Montreal Includes tutorials, documentation, and links in English and in French
  • An Introduction to Programming in Simula A textbook by Rob Pooley now available as HTML

ภาษาซ, ลา, simula, เป, นช, อเร, ยกรวมของภาษาโปรแกรมคอมพ, วเตอร, ภาษาค, simula, และ, simula, ภาษาโปรแกรมด, งกล, าวน, ได, เร, มพ, ฒนาข, นประมาณป, 2503, เป, นต, นมาท, นย, คอมพ, วเตอร, นอร, เวย, norwegian, computing, center, นครออสโลโดย, โอล, โยฮาน, ดาห, และ, คร, . phasasimula Simula epnchuxeriykrwmkhxngphasaopraekrmkhxmphiwetxr 2 phasakhux phasasimula 1 Simula 1 aelaphasasimula 67 Simula 67 phasaopraekrmdngklawniiderimphthnakhunpramanpi ph s 2503 epntnmathi sunykhxmphiwetxrnxrewy Norwegian Computing Center thinkhrxxsolody oxl oyhan dahl aela khrisetn inkaxard inechingwakysmphnthyngnbidwaepnchudphasaopraekrmchud xlkxl 60 Algol 60 thiechuxthuxidmakthisudxyuphasasimula 67 aenaihichwtthuhruxxxbeckt khlas class sbkhlas subclasses ewxrchwlemthxd virtual method okhruthin coroutine karkwadlangkhxmulkhya garbage collection aelaehtukarncalxngimtxenuxng discrete event simulation sungsimulaidrbkaryxmrbwaepnkarekhiynphasaopraekrmechingxxbecktrunaerksud aembangkhrngaebbcalxngxxbecktxacimsmburn dngthichuxkhxngmnbngbxkepnnyxyu opraekrmsimulaidaerkerimxxkaebbmakephuxkarcalxngsungkidmikarichenuxhakhxngmnmaepnphunthan hruxkrxbngansahrbkarxxkaebbphasaopraekrmechingxxbecktthnghlaythiichxyuinpccubnaeminpccubnopraekrmsimulayngmikarnamaichxyuxyangkwangkhwng echnkarcalxngkarxxkaebb VLSI opraekrmkrabwnkar processes ophrothkhxl phasakhntxnwithi aelakarprayuktxun echnkareriyngphimph erkhniethskhxmphiwetxraeladankarsuksa enuxngcakxxbecktechingsimulaidthuknamaprayuktsain phasa C xiththiphlkhxngsimilacungidrbkarklawthungkhwamsakhynxykwakhwamepncring enuxha 1 prawti 2 okhdxyangngay 2 1 opraekrmxyangnxythisud 2 2 khlassikehlolewild 2 3 chn chnyxy aelawithikaresmuxn 3 xangxing 4 duephim 5 aehlngkhxmulxunprawti aekikhokhdxyangngay aekikhopraekrmxyangnxythisud aekikh opraekrmxyangnxythisud miniml khxngSimula khuxiflwangepla sungmixngkhprakxbephiyng dmmisetthemnth ephiyngxyangediyw aetopraekrmxyangnxythisudkmkcaekhiynepnblxkwangeplatamkhwamniymdwyechnkn Begin End opraekrmnierimrnaelacblngthnthi odyinphasaSimulacaimmikarriethirnkhaemuxcbopraekrm khlassikehlolewild aekikh opraekrmphasaSimulaaebngaeyktwxksrelkaelaihy ekhsesnsithif twxyangtxipnikhuxopraekrmehlolewildinphasaSimula Begin OutText Hello World Outimage End chn chnyxy aelawithikaresmuxn aekikh A more realistic example with use of classes subclasses and virtual methods Begin Class Glyph Virtual Procedure print Is Procedure print Begin End Glyph Class Char c Character c Begin Procedure print OutChar c End Glyph Class Line elements Ref Glyph Array elements Begin Procedure print Begin Integer i For i 1 Step 1 Until UpperBound elements 1 Do elements i print OutImage End End Ref Glyph rg Ref Glyph Array rgs 1 4 Main program rgs 1 New Char A rgs 2 New Char b rgs 3 New Char b rgs 4 New Char a rg New Line rgs rg print End xangxing aekikhCompiling Simula Early history of the development of Simula by Jan Rune Holmevik IBM System 360 370 Compiler and Historical Documentation The Simula Standard and other historical documentation by Peter Sylvesterduephim aekikhkarekhiynopraekrmechingwtthuaehlngkhxmulxun aekikhIntroduction to OOP in Simula By J Sklenar based on the 1997 seminar 30 Years of Object Oriented Programming OOP at the U of Malta How Object Oriented Programming Started By Dahl and Nygaard abbrev version of an encyclopedia article on Nygaards home page Simula at the University of Montreal Includes tutorials documentation and links in English and in French An Introduction to Programming in Simula A textbook by Rob Pooley now available as HTML bthkhwamekiywkbkarekhiynopraekrm hrux phasaopraekrmniyngepnokhrng khunsamarthchwywikiphiediyidodyephimkhxmulekhathungcak https th wikipedia org w index php title phasasimula amp oldid 9350405, wikipedia, วิกิ หนังสือ, หนังสือ, ห้องสมุด,

บทความ

, อ่าน, ดาวน์โหลด, ฟรี, ดาวน์โหลดฟรี, mp3, วิดีโอ, mp4, 3gp, jpg, jpeg, gif, png, รูปภาพ, เพลง, เพลง, หนัง, หนังสือ, เกม, เกม