Percent sign

From Lazarus wiki
Jump to navigationJump to search

English (en) suomi (fi) français (fr) português (pt) русский (ru)

%

In ASCII, the character code decimal 37 (or hexadecimal 25) is defined to be % .

The symbol % (pronounced "percent sign") is used in Pascal:

The percent sign also appears in Lazarus IDE directives of the form {%directive}


Example

program simple_binary_digit;

var b:byte;
begin
  b := %1010011;
  writeln (b);
  writeln (binStr(b,8));
  writeln ;
  writeln ('Press [Enter] to finish');
  readln;
end.

The output prints as follows:

83
01010011
 
Press [enter] to finish
Light bulb  Note: Binary number literals are not supported in {$mode Delphi} and {$mode TP}.

See also