Cannot define a set constant

Hello, I am trialling Elements, the following does not seem to compile when Delphi Compatibility is turned on:

function IsValidIdent(const Ident: string; AllowDots: Boolean): Boolean;
const
Alpha = [‘A’…‘Z’, ‘a’…‘z’, ‘_’];
AlphaNumeric = Alpha + [‘0’…‘9’];
AlphaNumericDot = AlphaNumeric + [’.’];
var
I: Integer;
begin
Result := False;
if (length(Ident) = 0) or not (Ident[1] in Alpha) then Exit;
if AllowDots then
for I := 2 to length(Ident) do
begin
if not (Ident[I] in AlphaNumericDot) then Exit
end
else
for I := 2 to length(Ident) do
if not (Ident[I] in AlphaNumeric) then Exit;
Result := True;
end;

I get a “Type Mismatch” error on Alpha + [‘0’…‘9’]

If I change the line to

AlphaNumeric = Alpha;

I get an Internal error: IOE->U94

Project type is “.NET 6 Core Class library”

Logged as bugs://E25900.

bugs://E25900 was closed as fixed.

How do I get this fix? I am using the trial version (for now anyway).

I’ve uploaded a new build for you.

It should be available under Login | Portal | RemObjects Software

There should be a trial extension next to it (if not let me know), it might be you’ll need that if the license shows as expired with the new build.

Thanks very much for this, but could I have the setup file that includes Water. The one you uploaded doesn’t and seems to uninstall it.

Ah yes. it does that when the version mismatches. I’ve started a new water build, I’ll upload it tomorrow morning.

Up.

Thanks very much, your support has been excellent!

2 Likes