الگول۶۸
From Wikipedia, the free encyclopedia
From Wikipedia, the free encyclopedia
الگول۶۸ یک زبان برنامهنویسی دستوری کامپیوتر است که به عنوان جانشین زبان الگول ۶۰ که با هدف بزرگتر کردن محدوده و دقت بیشتر در معنی و نحو برنامهها تصور میشد. الگول ۶۸ برگرفته از واژههای انگلیسی ALGOrithmic Language 1968 به معنای «زبان الگوریتمی» است.
پارادایم برنامهنویسی | multi-paradigm: concurrent, imperative |
---|---|
طراحی شده توسط | A. van Wijngaarden, B.J. Mailloux, J.E.L. Peck and C.H.A. Koster, et al. |
ظهوریافته در | Report: 1968r0 |
انتشار پایدار | Algol 68/RR
/ Revised Report: 1973r1 |
static, strong, safe, structural | |
پیادهسازیهای بزرگ | |
الگول ۶۸ سی، ALGOL 68G (recent), ALGOL 68R, ALGOL 68RS, ALGOL 68S, FLACC, Алгол ۶۸ Ленинград/Leningrad Unit, Odra ALGOL 68 | |
گویش | |
ALGOL 68/FRr0 | |
متأثر از | |
الگول ۶۰, ALGOL Y | |
تأثیر گذاشته بر | |
C
C++,[1] پوسته بورن، Bash, Steelman, Ada, Python,[2] Seed7, Mary, S3 |
سهم زبان الگول در علوم کامپیوتر بسیار گستردهاست اگرچه برخی از مفاهیم آن تا وقتی که به صورت عمومی به شکل دیگری در خیلی از زبانهای توسعه یافتهٔ بعد از الگول استفاده شد شناخته نشدند
بخشهای الگول ۶۸ شامل نحو عبارت محور، تایپ دهی و ساختارهای اعلام شده توسط کاربر، ساختارها و یونیونهای برچسب دار، مدل مرجع متغیرها و پارامترها، رشته، آرایه، ماتریس برش و حتی همزمانی.
زبان الگول بهطور رسمی توسط [[[:w:en:IFIP Working Group 2.1|گروه کاری 2.1 IFIP]]] در بیستم دسامبر سال ۱۹۶۸ ساخته شد و پس از آن برای انتشار در مجمع عمومی IFIP تأیید شد.
زبان الگول بااستفاده از فرم گرامر دو سطحی تعریف شده که توسط [[[:w:en:Adriaan van Wijngaarden|آدرین ون ویجن گاردن]]] اختراع شد گرامر ون ویجن گاردن از یک گرامر مستقل از متن برای تولید مجموعهٔ نامتناهی از محصولات که یک برنامهٔ خاص الگول ۶۸ را میشناسد استفاده میکند آنها توانایی بیان انواع نیازها که در استاندارد بسیاری از زبانهای برنامهنویسی به عنوان معنا برچسبگذاری شدهاند و باید در متن زبان طبیعی مستعد ابهام بیان شوند.
اهداف اصلی و منظم طراحی الگول ۶۸:
زبان الگول ۶۸ پیشتر توسط اعضای گروه طراحی آن مثل دیسترا ادسخر دیسترا و هور تونی هور برای از بین بردن سادگی زبان الگول ۶۰ و تبدیل شدن به وسیلهای برای ایدههای پیچیده یا بیش از حد عمومی و انجام نشدن هیچ تلاشی برای ساده کردن کار کامپایلرنویس (دقیقاً بر خلاف کارهایی که رقیبان زبان الگول یعنی سی و پاسکال انجام دادهاند) مورد انتقاد واقع شدهاست.
در سال ۱۹۷۰ نخستین کامپایلر برای زبان الگول ساخته شد. این کامپایلر ALGOL 68R نام داشت.
کلمات رزرو شدهٔ الگول: در این زبان ۶۱ دستور و کلمهٔ رزرو شده وجود دارد:
mode, op, prio, proc, flex, heap, loc, long, ref, short, bits, bool, bytes, char, compl, int, real, sema, string, void, channel, file, format, struct, union, of "→", at "@", is ":=:", isnt ":/=:", true, false, empty, nil "○", skip "~", co "¢", comment "¢", pr, pragmat, case ~ in ~ ouse ~ in ~ out ~ esac "(~ | ~ |: ~ | ~ | ~)", for ~ from ~ to ~ by ~ while ~ do ~ od, if ~ then ~ elif ~ then ~ else ~ fi "(~ | ~ |: ~ | ~ | ~)", par begin ~ end "(~)", go to, goto, exit "□".
واحدها: عبارات سادهترین قسمت سازندهٔ زبان واحد ها (به انگلیسی: unit)هستند. واحدها میتوانند یک رابطه، یک عبارت بسته، یک روتین یا یکی از دستورهای ساختاری زبان (مثل تخصیص مقدار یا پرش شرطی) باشد. قسمت فنی و اساسی یک عبارت بسته برخی از ساختارها مثل بلوک، ساختار do و ساختار switch را که در زبانهای معاصر بودند را یکپارچه میکند. وقتی یک کلمهٔ کلیدی استفاده میشود معمولاً کاراکتر معکوس رشته برای معرفی کلمهٔ ورودی و خاتمه دادن به عبارت بسته استفاده میشود (مانند 'if' ~ then ~ else ~ 'fi', 'case' ~ in ~ out ~ 'esac', for ~ while ~ 'do' ~ 'od'). این ویژگی توسط استفان بورن برای پوستهٔ بورن یونیکس دوباره استفاده شد.
حالتها:اعلام تایپ دادهٔ ابتدایی (در الگول ۶۸ mode نامیده میشود) حقیقی، صحیح، مختلط، بول، کاراکتر، بیت و بایت هستند. برای مثال:
int n = 2; co n is a fixed as a constant of 2. co int m := 3; co m is a newly created local variable whose value is initially set to 3. co co This is short for ref int m = loc int := 3 co; real avogadro = 6.0221415⏨23; co Avogadro's number co long long real long long pi = 3.14159 26535 89793 23846 26433 83279 50288 41971 69399 37510; compl square root of minus one = 0 ⊥ 1;
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.