fpc-pascal
Subscribe to this list Your subscription
Latest threads
- SpVoice.GetVoices returned exception class EOleSysError8
The project has generated an exception class EOleSysError with a message: ???? ?????? ?? ??????. uses ...,ComObj; var SpVoice: Variant; SpVoice :=…
- Constants in generics6
I wanted to make a record generic that would serve as wrapper for an array allocated on the stack. Is there anyway to make constants work in generics? The generic type…
- sqldb create/free lifetime of object7
The sql query object and transaction object are created but not freed: http://www.freepascal.org/docs-html/fcl/sqldb/usingsqldb.html I think the docs should mention that…
- TSQLQuery and buffering.21
Firstly, I realise this is an old subject, but I still can't find any easy answer. Really, the question is simple: Is there ANY way of TSQLQuery NOT reading the entire…
- Call function in shared library from multiple threads15
I'm wondering if shared libraries (on Linux) support call exported function from multiple threads. I made small demo. Threads send JSON PChar into shared lib function…
- Good FFT example anywhere?17
I am looking for some good example of FFT functions in pascal but it seems like what Google serves up is rather old and refers to Turbo-pascal and the like... So maybe…
- Platform Dependent Integer Types12
Which integer types have their size dependent on platform? E.g. in Delphi, LongInt can 32 or 64 bits depending on the platform. The documentation says "every platform…
- Out of scope method?21
Does it exist now or has it ever been discussed that a method in TObject could be called when an instance of an object goes out of scope? It’s common to clean up…
- Re: Bug in documentation for Random?7
I've never used negative values, so this is just a guess: random(+10) will output numbres 0..9 random(-10) will output numbres -9..0 so, it is equivalent to -random(10)…
- mirror freepascal.stack.nl down0
One of the FPC mirrors "freepascal.stack.nl" is currently being migrated to a new vm. I hope access will be restored within hours.
- Setting record values5
I’ve been using a design pattern in my code which I think is probably pretty stupid so I’d like to make sure. Assume I have a type like TPoint below and I want to…
- SPARC / Linux20
I noticed there is no binary FPC 3.0.2 Linux release for SPARC. Should it be possible to compile it for SPARC, possibly using the older binary 2.6.2 release? If yes, I…
- parameter list declaration2
I'm looking for official reference for function/procedure parameter list declaration in Pascal. I found this: http://www.freepascal.org/docs-html/ref/refse91.html but…
- String Constants and Source File Code Page (Cross-platform)2
What is the recomended way to deal with string constants in units which are shared in cross-platforms projects? For example, i started a project in Linux, where the…
- Questions About Constructors4
1 - What happens if my constructor raise an exception? Is my destructor automatically called? 2 - Are the class fields automatically initialized to Default(T) just like…
- Error on closing application when using a library.1
Hello. One of my application use libgcc_s_dw2-1.dll. Sadly, on Wndows 10 I've got "Runtime Error!", when closing the program. The dll is working but this appends if…
- Something like TProcess.Environment for libraries ?7
Hello. If you are using a TProcess and your executable depends on libraries, there is TProcess.Environment to define the library path, example: AProcess.Environment.Text…
- Critical Section and Recursive Calls1
I'm writing a function protected by a critical section which can have recursive calls under certain conditions. Using the TCriticalSection class, after my thread…
- Delphi RTTI vs Free Pascal RTTI5
I need to write a code compatilble with both free pascal and delphi using the old style RTTI. What are the diferences between delphi's and free pascal's approach/types?…
- INVALID_SOCKET constant not defined for Linux6
I am porting application from Windows to Linux. I use Sockets unit. There is defined on Windows (and also on BeOS, FreeBSD, OS2): INVALID_SOCKET = TSocket(Not 0); // or…
- WideStringReplace bug?1
I am developing a console program which receives input in UTF-8, but it is converted to WideString for communication with COM. I found a weird behaviour of the…
- Delphi for Linux is out24
Just thought I would mention, yesterday Delphi 10.2 was released which includes Linux support (I assume a cross-compiler). It is only available in the Enterprise edition…
- TypeInfo question4
I have some generics which operate on multiple types and instead of making subclasses for certain types and overriding methods I wonder if using the RTTI like:…
- FreePascal Windows - Force files to write to disk41
I have a freepascal Windows console application that I recently ported over from DOS Turbo Pascal. I am have a small settings file that I write to disk that keeps…
- Threadvar member field6
I have a class where its instances are shared between multiple threads. How can I declare one variable per instance per thread? The code below does not compile (fpc…
- rtl-generics vs fgl6
Sorry if this is a silly question, I didn't really follow Generics discussions in the past. If the "rtl-generics" package a replacement for the fgl unit? Going forward…
- Interface Inheritance Bug5
Test env: debian jessie amd64 - fpc 3.0.2 It seems free pascal have a bug when handling interface inheritance using generics. When i try to compile the unit bellow, i…
- Generics Bug4
Please confirm this bug. The unit code bellow won't compile (fpc 3.0.2 - debian jessie amd64): "generics_bug.pas(17,48) Fatal: Syntax error, "," expected but "<" found"…
- TThread.OnTerminate ?6
Hello. Does it exist a equivalent of the Delphi TThread.OnTerminate ? http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/…
- Forward Generic Type Declaration Bug9
Please confirm if this is a bug. When I try to compile the unit below I get the error: "generics_bug.pas(14,43) Fatal: Internal error 2012101001" It seems the compiler…
