mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-02 01:02:38 +02:00
24 lines
481 B
ObjectPascal
24 lines
481 B
ObjectPascal
{%OPT=-O3 }
|
|
program test48086;
|
|
{$mode objfpc}{$H+}
|
|
function IsFontNameXLogicalFontDesc(const LongFontName: string): boolean;
|
|
var MinusCnt, p: integer;
|
|
begin
|
|
MinusCnt:=0;
|
|
for p:=1 to length(LongFontName) do
|
|
if LongFontName[p]='-' then inc(MinusCnt);
|
|
Result:=(MinusCnt=14);
|
|
end;
|
|
var
|
|
myfont:string;
|
|
begin
|
|
myfont:='Myfont--------------';
|
|
if IsFontNameXLogicalFontDesc(myfont) then
|
|
writeln('NO ERROR')
|
|
else
|
|
begin
|
|
writeln('Error in count');
|
|
halt(1);
|
|
end;
|
|
end.
|