Forum > General

Does Freepascal has everything "must have" functional features as C does

<< < (2/10) > >>

marcov:

--- Quote from: MarkMLl on August 08, 2022, 03:57:27 pm ---
--- Quote from: marcov on August 08, 2022, 03:41:56 pm ---Standard or language? What is the language level in M2 ?

--- End quote ---

M2 had coroutines and TRANSFER() etc. from day one as I understand it.

--- End quote ---

As part of the standard, but could be implemented as pure library solution?


--- Quote ---It must also have had some way of getting at the I/O address space (although I forget the detail, and I don't think C- as standard- has that) but no form of attributes etc. which could be used to select between an arbitrary number of segments (term used loosely) or address spaces.

--- End quote ---

Aside from the fact that such implementation details don't belong in a standard, the code and datasegments of a cooperative tasks is roughly the same. So the only hardware bit is the stack. Changing the stack to a different segment might upset security software, so that must be done in an OS specific way.

Thaddy:

--- Quote from: marcov on August 08, 2022, 02:19:33 pm ---
No parameterized macros

--- End quote ---
True. Although macro's are not strictly part of the language.

--- Quote ---and no ? operator.
--- End quote ---
FPC has a generic ifthen<> (I wrote that) which is more or less the same, although it is not an operator, but a library function.

marcov:

--- Quote from: Thaddy on August 08, 2022, 04:25:57 pm ---
--- Quote from: marcov on August 08, 2022, 02:19:33 pm ---
No parameterized macros

--- End quote ---
True. Although macro's are not strictly part of the language.

--- End quote ---

In C to my best knowledge they are, which was the point.


--- Quote ---
--- Quote ---and no ? operator.
--- End quote ---
FPC has a generic ifthen<> (I wrote that) which is more or less the same, although it is not an operator, but a library function.

--- End quote ---
I was not aware that that lazily evaluated?

MarkMLl:

--- Quote from: marcov on August 08, 2022, 04:20:35 pm ---As part of the standard, but could be implemented as pure library solution?

--- End quote ---

As part of the language. I'm not sure whether than can be implemented as a standard library routine, since a stack (etc.) context switch is involved.

Similarly, access to addressspaces other than standard memory is a compiler issue since at some point specialist assembler has to be emitted. (I can't remember how e.g. SPARC handled this in C).

MarkMLl

MarkMLl:

--- Quote from: marcov on August 08, 2022, 04:29:02 pm ---In C to my best knowledge they are, which was the point.

--- End quote ---

I think you're right, although I also think that it's defined that the preprocessor is (or at least behaves as) a separate pass.


--- Quote ---I was not aware that that lazily evaluated?

--- End quote ---

Agreed, was discussed a few weeks ago the PascalDragon's involvement.

MarkMLl

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version