E2001 Ordinal type required

Here facing some errors on Ordinal type required, please help me to check it out from the following code:

Extracted from comments:

Program Test;    
{$APPTYPE CONSOLE}    
Type
  TResourceSet = set of 0..127;
var
  N : TResourceSet;
  i : Int64;
begin
  i := 127;
  N := N + [i];  // E2001 Ordinal type required
end.


Read more here: https://stackoverflow.com/questions/65716818/e2001-ordinal-type-required

Content Attribution

This content was originally published by Lobsang Tashi at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: