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;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
        age, months, days, hours: integer;
begin
        writeln ('How old are you?');
        readln (age);
        writeln ('Please enter the number of months since your last birthday.');
        readln (months);
        days:=age*365+months*30;
        hours:=days*24;
        writeln ('Your age in days is ', days,',');
        writeln ('Your age in hours is ', hours,',');
        sleep (50000);
    end.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.