String handling · التعامل مع النصوص
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · تحتاج هذه الصفحة إلى متصفح حديث (يدعم SharedArrayBuffer). يرجى تحديث Chrome أو Edge أو Firefox أو Safari إلى أحدث إصدار.
English
LENGTH, MID and RIGHT
- The 2026 guide's string routines are
LENGTH,MID,RIGHT,UCASEandLCASE. - Positions start at 1.
MID(text, start, length)copieslengthcharacters fromstart.RIGHT(text, n)copies the lastncharacters.
العربية
LENGTH, MID and RIGHT
- دوال السلاسل النصية في دليل 2026 هي
LENGTH،MID،RIGHT،UCASEوLCASE. - تبدأ المواقع من 1.
MID(text, start, length)ينسخlengthأحرفًا منstart.RIGHT(text, n)ينسخ آخرnأحرف.
OUTPUT LENGTH("Happy Days")
OUTPUT MID("ABCDEFGH", 2, 3)
OUTPUT RIGHT("ABCDEFGH", 3)
English
UCASE and LCASE take one character
- The guide's
UCASEandLCASEtake a single character, not a whole string. UCASE('h')is'H'. A character that is not a letter comes back unchanged.- When a paper needs a whole string in capitals, the insert gives you
TO_UPPER.
العربية
UCASE and LCASE تأخذان حرفاً واحداً
UCASEوLCASEفي الدليل يأخذان حرفاً واحداً، وليس نصاً كاملاً.UCASE('h')هي'H'. الحرف الذي ليس حرفاً أبجدياً يعود كما هو.- عندما تحتاج ورقة إلى سلسلة نصية كاملة بأحرف كبيرة، يوفر لك الإدراج
TO_UPPER.
OUTPUT UCASE('h')
OUTPUT LCASE('W')
OUTPUT TO_UPPER("Error 803")
English
& joins strings
&concatenates two strings."Summer" & " " & "Pudding"is"Summer Pudding".- IGCSE 0478 has no
&. There you list values afterOUTPUTwith commas. - Commas still work in this guide when you only want them printed side by side.
العربية
& توصل النصوص
&تدمج نصين."Summer" & " " & "Pudding"هي"Summer Pudding".- IGCSE 0478 لا تحتوي على
&. هناك تقوم بترقيم القيم بعدOUTPUTبفواصل. - الفواصل لا تزال تعمل في هذا الدليل عندما تريد طباعتها بجانب بعضها فقط.
OUTPUT "Summer" & " " & "Pudding"
English
Common mistakes
MIDcounts from 1. The second argument is the start, the third is how many characters.- Do not pass a whole string to
UCASE. That routine is for one character.
العربية
أخطاء شائعة
MIDتعدّ من 1. الوسيط الثاني هو البداية، والثالث هو عدد الأحرف.- لا تمرر نصاً كاملاً إلى
UCASE. ذلك الروتين مخصص لحرف واحد.
English
Now you try
- Use
MID,RIGHTand&.
العربية
الآن جرب بنفسك
- استخدم
MID،RIGHTو&.
Output MID("ABCDEFGH", 2, 3) and RIGHT("ABCDEFGH", 3), each on its own line. · أخرج MID("ABCDEFGH", 2, 3) و RIGHT("ABCDEFGH", 3)، كل واحد في سطر خاص به.
Click Run to see the output here. · اضغط تشغيل لرؤية المخرجات هنا.
Output Summer Pudding by joining Summer, a space and Pudding with &. · أخرج Summer Pudding عن طريق ربط Summer، مسافة، و Pudding باستخدام &.
Click Run to see the output here. · اضغط تشغيل لرؤية المخرجات هنا.
Output the upper-case form of the character h, then ERROR 803 using TO_UPPER. · أخرج الشكل كبير الأحرف للحرف h، ثم ERROR 803 باستخدام TO_UPPER.
Click Run to see the output here. · اضغط تشغيل لرؤية المخرجات هنا.