[fpc-pascal] Error: Illegal qualifier in converting Delphi unit
Frank Church
vfclists at googlemail.com
Mon Mar 15 00:52:29 CET 2010
Your suggestion worked - what is the secret?
Does the array[0..0 have some relevance here?]
On 14 March 2010 23:01, Howard Page-Clark <hdpc at talktalk.net> wrote:
> On 14/3/10 6:11, Frank Church wrote:
>>
>> Hi guys,
>>
>> I am trying to compile the TVersionInfo component by Anders Melander
>> at http://melander.dk/articles/versioninfo/.
>>
>> It defines the structure below
>>
>> type
>> TTranslationRec = packed record
>> case Integer of
>> 0: (
>> LanguageID: WORD;
>> CharsetID: WORD);
>> 1: (
>> TranslationID: DWORD);
>> end;
>> PTranslationRec = ^TTranslationRec;
>> TTranslationTable = array[0..0] of TTranslationRec;
>> PTranslationTable = ^TTranslationTable;
>>
>>
>> which causes the compiler error
>>
>> VersionInfo.pas(141,37) Error: Illegal qualifier
>>
>> function TVersionInfo.GetCharset(Index: integer): WORD;
>> begin
>> Result := TranslationTable[Index].CharsetID;
>> end;
>>
>> Is there a way to convert for Free Pascal compatibility?
>
> try:
>
> result := TranslationTable[Index]^.CharsetID
>
> Howard
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
--
Frank Church
=======================
http://devblog.brahmancreations.com
More information about the fpc-pascal
mailing list