Sign in Join
Wiki copytemporary

period

English · Français · Suomi

radix mark

Pascal uses the . (dot) to separate the integer and fractional part in literal decimal integers.

pascal
myReal := 6.28318

At least one digit in front of the period is mandatory. A 0 integer part must not be omitted.

Numbers noted in a non-decimal base can not be noted in that way. E. g. the numeric value “a half” can not be written as %0.1 (% being the prefix marking binary numbers).

identifier scope selector

For structured data types the dot separates the data structure identifier from its individual components, i. e. methods or data fields.

pascal
program recordDemo(input, output, stderr);

uses
    Linux;

var
    info: TSysInfo;
begin
    if sysInfo(@info) <> 0 then
    begin
        halt(1);
    end;
    
    writeLn('uptime: ', info.uptime, ' seconds');
    
    with info do
    begin
        writeLn('total free: ', freeram, ' bytes');
    end;
end.

range

Two consecutive dots .. let you specify an ordinal type sub-range.

pascal
type
    signumCodomain = -1..1;

This is the same as math.TValueSign.

module end

The main block of any module, i. e. program, unit or library, has to be closed with an end “dot”:

pascal
program hiWorld(input, output, stderr);

begin
    writeLn('Hi world!');
end.

It can be seen as an adoption of natural (written) languages, where a full stop marks an end of a sentence.

Anything else after the final end., assuming syntactical correctness, will be ignored by the compiler.

namespaces

Unit names containing dots create namespaces.

ASCII value

In ASCII, the character code decimal 46 (or hexadecimal 2E) is defined to be . (full stop).


From the Free Pascal wiki, page "period", as it stood on 2020-07-09 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.