On 10/21/24 5:37 AM, Hairy Pixels via fpc-pascal wrote:
then isn’t Pascal’s requirement to predeclare uninitialized variables
the worst possible design? In C you can at least declare a variable
with its assignment in one step but with Pascal by design you can
always read uninitialized memory
Dennis via fpc-pascal schrieb am Mo., 21.
Okt. 2024, 05:09:
>
>
>> I am expected to create and pass an instance of such class
>> ApiProxyWrapperReply in my calling program
>> via a function
>> void SPAPI_RegisterApiProxyWrapperReply(ApiProxyWrapperReply*
>> apiProxyWrapperReply);
>>
>> and the
I am expected to create and pass an instance of such class
ApiProxyWrapperReply in my calling program
via a function
void SPAPI_RegisterApiProxyWrapperReply(ApiProxyWrapperReply*
apiProxyWrapperReply);
and the external library will then call the various methods of
On Oct 21, 2024 at 7:54:22 AM, Bernd Oppolzer via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:
> 3. Standard Pascal has only pointers, which point to the heap and are
> created by the NEW procedure.
> I am the maintainer of another Pascal dialect (Stanford Pascal) - and,
> like many other
No shitstorm from my part :-)
I am working with Pascal, C and other programming languages (PL/1 for
example) for more than 40 years now,
and I am thinking sometimes about what makes programming languages
secure or insecure - or: what are the
common reasons for runtime errors?
Some observation
Ah, Ok thanks!
> On Oct 20, 2024, at 3:32 PM, Martin Frb via fpc-pascal
> wrote:
>
> The compare function is declared right inside the class
>
> { TFPGList }
>
> generic TFPGList = class(TFPSList)
> private
> type
> TCompareFunc = function(const Item1, Item2: T): Integer;
>
>
Apropos the new users discussion, i think the state of the docs is really
important, new users can be discouraged by lack of documentation or up-to-date
docs.
I just recently retired so not a new young user, but relatily new to fpc. So,
I’m willing to help update the docs, correct typos, etc, i
The compare function is declared right inside the class
{ TFPGList }
generic TFPGList = class(TFPSList)
private
type
TCompareFunc = function(const Item1, Item2: T): Integer;
"T" is from the generic, so if you specialized with string, then T is
string.
It is a function, not a
Just tried to compile a short program with that definition of compare:
TCompareFunc, and that is the wrong type for TFPGList in my program
(yes there is a better class for strings but I just wanted a quick example
program to compile). FPC error message says it wants:
function(const ShortString;c
On 20/10/2024 22:17, ppadilcdx--- via fpc-pascal wrote:
I’m a little confused by some references in the docs. Hopefully I can explain
it clearly.
Looking at TFPGList in fgl. The Sort method refers to a TCompareFunc (it does
not link to its definition). TFPGList says it’s methods are the same a
I’m a little confused by some references in the docs. Hopefully I can explain
it clearly.
Looking at TFPGList in fgl. The Sort method refers to a TCompareFunc (it does
not link to its definition). TFPGList says it’s methods are the same as
TFPSList or classes.TFPList. So looking in these two ot
Regarding Memory Management
Its possible to write a Pascal program w/o any pointer, but it may be not
elegant and interfaces to some C-like GUI structures, as used in all common
OSs, are impossible.
But, I am using Borland Pascal (sic!) and also FreePascal (no Lazarus) for
small embedded s
12 matches
Mail list logo