Forum > General

Converting Delphi program - poblem compiling character.pas unit

(1/1)

RodneyK:
I'm trying to compile a Delphi dll as a 64 bit dll. I'm getting a compiler error as follows.

Character.pas has a type declaration

 TUnicodeCategory = (
    ucControl,
    ucFormat,
    ucUnassigned,
    ucPrivateUse,
    ucSurrogate,
    ucLowercaseLetter,
    ucModifierLetter,
    ucOtherLetter,
    ucTitlecaseLetter,
    ucUppercaseLetter,
    ucCombiningMark,
    ucEnclosingMark,
    ucNonSpacingMark,
    ucDecimalNumber,
    ucLetterNumber,
    ucOtherNumber,
    ucConnectPunctuation,
    ucDashPunctuation,
    ucClosePunctuation,
    ucFinalPunctuation,
    ucInitialPunctuation,
    ucOtherPunctuation,
    ucOpenPunctuation,
    ucCurrencySymbol,
    ucModifierSymbol,
    ucMathSymbol,
    ucOtherSymbol,
    ucLineSeparator,
    ucParagraphSeparator,
    ucSpaceSeparator
  );
                 

Subsequently a const declaration is made

const
  Latin1Categories: array[0..255] of TUnicodeCategory =
    ( { page 0 }
      TUnicodeCategory.ucControl, TUnicodeCategory.ucControl,
      TUnicodeCategory.ucControl, TUnicodeCategory.ucControl,
      TUnicodeCategory.ucControl, TUnicodeCategory.ucControl,
      TUnicodeCategory.ucControl, TUnicodeCategory.ucControl,
      TUnicodeCategory.ucControl, TUnicodeCategory.ucControl,
      TUnicodeCategory.ucControl, TUnicodeCategory.ucControl,
      TUnicodeCategory.ucControl, TUnicodeCategory.ucControl,
      TUnicodeCategory.ucControl, TUnicodeCategory.ucControl,
      TUnicodeCategory.ucControl, TUnicodeCategory.ucControl,
      TUnicodeCategory.ucControl, TUnicodeCategory.ucControl,
      ...
      ...
      ...
      ...
      ...
      TUnicodeCategory.ucLowercaseLetter, TUnicodeCategory.ucLowercaseLetter,
      TUnicodeCategory.ucLowercaseLetter, TUnicodeCategory.ucLowercaseLetter,
      TUnicodeCategory.ucLowercaseLetter, TUnicodeCategory.ucLowercaseLetter
    );

When compiling an Illegal qualifier error is declared at character 24 and an illegal expression at character 33 in the first line containing 'TUnicodeCategory.ucControl,' I.e.,

                 |24      |33
TUnicodeCategory.ucControl,

Can any one tell me what is wrong?


 

Marc:
Have you tried without prefixing with TUnicodeCategory. ?

RodneyK:
That worked. Thanks. On to the next compiler error. :-)

Leledumbo:
AFAIK qualifying enum constants by its type name has been supported in svn for quite some time. Another feature that is not backported to 2.4.X I guess...

Navigation

[0] Message Index

Go to full version