Hairy Pixels via fpc-pascal said on Fri, 13 May 2022 22:43:15 +0700
>Is there an “alloca" like function in the RTL which allocates memory
>from the stack? For example
>https://man7.org/linux/man-pages/man3/alloca.3.html
Why not just allocate from the heap? Everything I've seen tells me that
if yo
On Sun, 15 May 2022, Martin Frb via fpc-pascal wrote:
On 15/05/2022 15:07, Hairy Pixels via fpc-pascal wrote:
var
I: ElementType(TMySet);
begin
for i := low(TMySet) to high(TMySet) do
;
type
TMySet = set of (one,two,three);
var
I: low(TMySet) .. high(TMySet) ;
begin
for i :
On 15/05/2022 15:07, Hairy Pixels via fpc-pascal wrote:
var
I: ElementType(TMySet);
begin
for i := low(TMySet) to high(TMySet) do
;
type
TMySet = set of (one,two,three);
var
I: low(TMySet) .. high(TMySet) ;
begin
for i := low(TMySet) to high(TMySet) do
;
__
On Sun, 15 May 2022 09:03:58 +0200 (CEST)
Michael Van Canneyt via fpc-pascal
wrote:
> On Sun, 15 May 2022, Hairy Pixels via fpc-pascal wrote:
>
> > Is there a compiler intrinsic to get the element type of a set at
> > compile time? So if you have “set of T” it should return T.
>
> I don't thi
> On May 15, 2022, at 2:03 PM, Michael Van Canneyt via fpc-pascal
> wrote:
>
> Type
> TMySet = set of (one,two,three);
>
> The element type does not exist as a separate type.
I mean if you had code like this T would be the anonymous enum (one,two,three).
Maybe element is not the correct te
On Sun, 15 May 2022, Hairy Pixels via fpc-pascal wrote:
Is there a compiler intrinsic to get the element type of a set at compile time?
So if you have “set of T” it should return T.
I don't think you can make such an intrinsic.
This type does not always exist, since you can define
Type