Start New Discussion within our Software Development Community

Dear Sir,

The following is the very basic programme, but I often miss the comma and delimiter which is red in colour. Could you express the meaning of this?

program AgeCalculator;



        age, months, days, hours: integer;
        writeln ('How old are you?');
        readln (age);
        writeln ('Please enter the number of months since your last birthday.');
        readln (months);
        writeln ('Your age in days is ', days,',');
        writeln ('Your age in hours is ', hours,',');
        sleep (50000);

program AgeCalculator;

I see,let's look your code a bit closer. :confused:
days is an identifier of your variable of the main program.When you referece a variable do not put it between apostrophe.Cause the text between apostrohe will show the screen

WriteLn('Your age in days is '); this is the text that you show the screen.And then you can use your variable separate with baton,see

WriteLn('Your age in days is ',days);
do you understand now? :D

This question has already been answered. Start a new discussion instead.