Types and constants · סוגים וקבועים
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
Six data types
- The 2026 guide uses
INTEGER,REAL,CHAR,STRING,BOOLEANandDATE. DATEis in this guide. It is not in the IGCSE 0478 syllabus for 2026–2028.- A paper that uses a date tells you the format, because dates are written differently around the world.
עברית
שש סוגי נתונים
- המדריך 2026 משתמש ב
INTEGER,REAL,CHAR,STRING,BOOLEANוDATE. DATEנמצא במדריך זה. הוא אינו מופיע בסילבוס IGCSE 0478 לשנים 2026–2028.- מבחן שמשתמש בתאריך מספק לך את הפורמט, מכיוון שתאריכים כתובים בצורות שונות בכל העולם.
DECLARE Name : STRING
DECLARE Done : BOOLEAN
DECLARE Birth : DATE
Name ← "Ada"
Done ← TRUE
OUTPUT Name
OUTPUT Done
English
CONSTANT uses =
- A constant is a name for a value that the program does not change.
- The guide writes
CONSTANT HourlyRate = 6.50— with=, not with the arrow. - Only a literal may stand on the right: a number, or text in quotes.
עברית
CONSTANT משתמש ב=
- קבוע הוא שם לערך שאינו משתנה בתוך התוכנית.
- המדריך כותב
CONSTANT HourlyRate = 6.50— עם=, ולא עם החץ. - רק קבוע סטטי יוכל לעמוד בצד ימין: מספר, או טקסט בתוך תווי הציטוט.
CONSTANT PassMark = 50
OUTPUT PassMark
English
Watch out
- Variables are stored with
←. Constants are declared with=. - The guide's own date example is written
02/01/2005. On the paper, follow the format the question gives you.
עברית
שימו לב
- משתנים מאוחסנים עם
←. קבועים מוגדרים עם=. - הדוגמה לתאריך של המדריך עצמו כתובה
02/01/2005. בדף העבודה, הייעזר בפורמט שהשאלה נותנת לך.
English
Common mistakes
BOOLEANvalues areTRUEandFALSE, in capitals.- A
CHARis one character in single quotes, such as'A'. ASTRINGuses double quotes.
עברית
טעויות נפוצות
- ערכי
BOOLEANהםTRUEוFALSE, באותיות גדולות. CHARהוא תווית אחת בתוך סימני ציטוט יחידים, כמו'A'.STRINGמשתמש בתווי ציטוק כפולים.
English
Now you try
- Declare a constant with
=and output it. - Text needs quotes:
"Ada", notAda.
עברית
כעת תנסו בעצמכם
- הגדר קבוע עם
=והוצא אותו. - טקסט זקוק לתווי ציטוט:
"Ada", לאAda.
Declare a constant PassMark equal to 50 and output it. Fill in the value on the CONSTANT line. · הגדר קבועה PassMark ששווה ל-50 והדפס אותה. מלא את הערך בשורה ה-CONSTANT.
Click Run to see the output here. · לחץ על הרץ כדי לראות את התוצא כאן.
Output the word Ada in quotes, so the program prints Ada. · הדפס את המילה Ada בתוך תגיות ציטוט, כך שהתוכנית תדפיס Ada.
Click Run to see the output here. · לחץ על הרץ כדי לראות את התוצא כאן.
Declare Name as a STRING, store Ada, and output it. · הכרז Name כ-STRING, אחסן בו את הערך Ada, והדפס אותו.
Click Run to see the output here. · לחץ על הרץ כדי לראות את התוצא כאן.