That's just because the above code is in Pascal. You see, it would be much more complicated if written in C++ or distributed real-time Java.
Pascal uses := for assignments, if I remember correctly?
if pilot.sleeping = true then alarm.playing := true;
// This will check if the property "sleeping" of pilot is true and will then set the property "playing" of alarm to true as well.
You could also do a "while" or "repeat .. until" there which would probably better to stop the alarm if the pilot wakes up again (... then alarm.playing := false).It could totally work this way if you programmed a simple flight simulator with Delphi, even today.
BTW, one exception to := in assignments are initialized variables inside a var section:
var
announcement: string = 'Wake up!';Of course there is FreePascal and Lazarus and all that if you really want to play with Pascal without touching Delphi. Both are neat, even though Delphi is also now available as a free community edition.
What I'm saying is: Go forth and write more `:=`