ENع
الدرس 05 · Basics

Functions

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

A function is a named block of code with typed inputs and a typed output. Follow one small program as main calls area(3, 4) and area(5, 2): watch each call get its own frame on the call stack, the arguments get copied into the parameters, and return carry one answer back to the line that asked. Then see the compiler reject a call with a missing argument before anything runs.

10 دقيقة10 خطوات5 أسئلةBeginner
شكل 5 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.