Percent sign

From Free Pascal wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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