Also, I think that Michalis Kamburelis' introduction is a must-read for
newcomers nowadays:
https://castle-engine.io/modern_pascal
Best regards,
Rafael
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mail
Hi everyone. I am sharing some cross-platform timing I have done, it would
be great to hear from you.
For mac I translated this python implementation to free pascal:
https://github.com/pupil-labs/pyuvc/blob/master/pyuvc-source/darwin_time.pxi
):
```
unit tim
Bart wrote:
> On Tue, Feb 6, 2024 at 6:13 PM Rafael Picanço via fpc-pascal
> wrote:
>
>
> > type
> > {$IFDEF CPU86}{$IFDEF CPU32}
> > TLargerFloat = Extended;
> > {$ENDIF}{$ENDIF}
> >
> > {$IFDEF CPUX86_64}
> > TLargerFloat = D
> I’m afraid I don’t qualify for the bonus, because I don’t know what
LargerFloat is.
I am a little bit embarrassed here. The TLargerFloat is a type I wrote for
a simple test some time ago and I forgot about it. I was following the
TLargeInteger convention (from struct.inc in my current windows sy
I have some questions about {$MINFPCONSTPREC 64} and the mentioned change
introduced by FPC 2.2 (the "it" from here after).
1) Does it affects constants only?
2) Does it affects the LargerFloat type?
3) Should I use {$MINFPCONSTPREC 64} in {$mode objfpc} too to avoid it?
4) BONUS: Is the Larger
gt; On Jan 30, 2024, at 6:45 PM, Rafael Picanço via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > Hi everyone, how are you doing?
> >
> > I am receiving an "FLT divide by zero" error when creating a renderer
> with
> >
Hi everyone, how are you doing?
I am receiving an "FLT divide by zero" error when creating a renderer with
// will default to Direct3d renderer
DL_CreateRenderer(FSDLWindow, -1,
// error
// SDL_RENDERER_ACCELERATED or SDL_RENDERER_PRESENTVSYNC
SDL_RENDERER_SOFTWARE
);
So, my note
It is really not related to specific lines. But sometimes the error will
repeat a lot on some lines.
Please, can you confirm if a zip file containing the project it self is a
minimal valid example? (I am afraid that changing the trying to simplify
the project will "solve" the error).
With some mo
Hi everyone,
I am getting a strange error when compiling a project. I am really not sure
what is going on, because it occurs sometimes, consistently in some lines
of the code with calls to this static variable:
...
function NextID(ID : word) : word;
...
NextID(ContainerClass.SomeTypeInstance.ID)
.
Hi guys,
I am looking for some advice on how to use a speech-to-text model with a
fpc program designed to teach reading of invented words composed from 8
brazilian portuguese phonemes (four consonants and fours vowels).
So, right now (
https://github.com/cpicanco/stimulus-control-sdl2/blob/hanna/
Thank you Michael, worked like a charm.
On Mon, Jul 24, 2023 at 7:00 AM
wrote:
> Send fpc-pascal mailing list submissions to
> fpc-pascal@lists.freepascal.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc
I just updated to trunk (Lazarus 3.99 4ed7ff9b1c, FPC
3.3.1-13378-gceddc2aec3) and I am getting an "Identifier not found" error
for TStringHelper:
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/lis
Hi James,
I am not familiar with variants and Ole objects, sorry about that. I found
some people using code with Ole objects and it that seems to work, can you
chack if it applies to your case?
https://stackoverflow.com/questions/17970573/using-word-ole-in-lazarus-freepascal
Best,
R
On Sun, Jun
Hi James,
Sorry, I missed the following reference:
"Remark Dispatch interface support for variants is currently broken in the
compiler." (https://www.freepascal.org/docs-html/ref/refsu20.html)
Best,
R
>
___
fpc-pascal maillist - fpc-pascal@lists.fre
Thanks Guilhermo,
Just to clarify, I do have a limited number of events. Lets say, 2 events.
So, using the SDL_RegisterEvents function, is it possible to define these
two new events as normal constants so they will be known at compile time
and will make Free Pascal case statements happy?
Best,
R
Hi James,
> SpVoice : Variant;
> SpVoice := CreateOleObject('SAPI.SpVoice')
The Free Pascal Variant type does not handle interfaces by default. Take a
look:
https://wiki.freepascal.org/Variant
Best,
R
___
fpc-pascal maillist - fpc-pascal@lists.freep
Hi everyone!
I am sharing my free pascal bindings for eyelink headers.
https://github.com/cpicanco/EyeLink-for-Pascal
If you find it useful, please let me know.
Best,
R
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepasc
Hi,
The SDL2 documentation recommends you to register constants with:
Uint32 SDL_RegisterEvents(int numevents);
numevents = the number of events to be allocated.
Returns the beginning event number, or (Uint32)-1 if there are not
enough user-defined events left.
https://wiki.libsdl.org/SDL2/
Hi Tomas,
On top of your suggestion, the only way to make FPC happy is to assign nil
to the type constants and then assign the corresponding pointers to them
somewhere:
unit eyelink.constants
interface
const
EXTERNAL_DEV_NONE : TGetExButtonStatesFunction = nil;
EXTERNAL_DEV_CEDRUS : TGetExBut
Hi Marco,
I am trying to follow your advice and use units instead:
const
EXTERNAL_DEV_NONE : TGetExButtonStatesFunction = Pointer(0);
However I am receiving an error:
Error: Incompatible types: got "Pointer" expected ""
Please, can you shed some light on this?
Best,
R
On Wed, Jun 14, 2023
Thank you Marco, I am elaborating on top of your suggestions.
> The problem is that the logical solution, making it a macro, doesn't
work, as macro definitions don't export through USES clauses.
I think that pre-processor constants with $I would be a valid alternative
for using the best solution.
Hi everyone,
First of all, I am sorry if this is not the best place for this
interoperability issue.
The problem I want to solve is how to make a Free Pascal binding for to the
following piece of C code:
typedef struct _CCDBS {
void *userdata;
char buttons[256];
void *internal;
}CCDBS;
ty
22 matches
Mail list logo