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 ו-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 ו-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.
עברית
& מחבר מחרוזות
&מאחד (concatenates) שני מחרוזות."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. הרoutine הזו נועדה לתווה בודד.
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. · לחץ על הרץ כדי לראות את התוצא כאן.