fpc-pascal · 2018-07
- Free Pascal console programs on Android are easy15
http://turbocontrol.com/gnuroot.htm is a new (unpublished) web page. Feedback appreciated!
- Operator overload bug18
I mentioned this as an aside a while ago but I don’t remember getting a response so I’d like to formally reintroduce the issue. Should I file a bug report for this…
- access violation?17
I was doing some testing today (Mac) and discovered that calling Free on a nil object didn’t cause a EAccessViolation exception. Why doesn’t that crash? var c:…
- Assigning open array1
Hello: I'm not very sure how open arrays are copied program Project1; Type TMyRecord=record somedata:string; ArrayInt:array of integer; end; TRecordList=array of…
- Pascal Neopixels5
I'm not sure what would be the correct list for this question since it involves writing Pascal code and not Lazarus, so here goes ... Can anyone offer me any advice or…
- Syntax changes suggestions112
I have some suggestions of change to freepascal syntax, just to debate (All are backward compatible) - Declaring variables inside blocks, and loop variables - Autofree…
- Generics - extending TFPGObjectList3
I needed to extend TFPGObjectList and I found two wierd things (FPC 3.1.1 r39507): program project1; {$mode objfpc}{$H+} uses Classes, FGL; type …
- How __FPC_specific_handler() is invoked4
I am writing my own __FPC_specific_handler() but I can't figure out when this function is registered. I guess this function is registered to the OS to be invoked when an…
- No type info available for this type (Enumerated type with constant assignment)6
I am trying out the examples at http://wiki.freepascal.org/Enumerated_types but The following simple program will raise compiler error "No type info available for this…
- Pascal units to connect to an Exchange server5
to send e-mails programmatically using a Microsoft Exchange account. Using Windows resources, I could call Outlook automation API to do this task. But is the same…
- GetAppConfigDir(False) in a Citrix environment5
One of my apps also runs in a Citrix environment. It does not retrieve it's settings. If appears that GetAppConfigDir(False) returns "C:\Users\<username>\AppData\Local".…
- How to translate Delphi Assembly MOV EAX,[EBP+4]4
The following delphi code when compiled by FPC, raised these errors: Compile Project, Target: lib\x86_64-win64\Project1.exe: Exit code 1, Errors: 10, Warnings: 2…
- A new fpc desirable feature10
As everybody is suggesting new fpc features, I feel it right to add my own proposal, to make the language more useful and user friendly. I propose the support for the…
- Loss of precision when using math.Max()41
I stumbled upon something the other day that was causing numerical differences between compiled Delphi and FPC code. Executing the following sample console application…
- Coercing record fields together5
Could I do some RTL magic on a record to loop over its fields and set them to another record by name? In the example below I want to set all the fields in TRecA to…
- How to use Google Protocol Buffer0
To connect to a server, I need to use Google's Protocol Buffer format. The only workable parser to convert the protocol definition file to pascal reader/writer source…
- Searchable docs online5
Given the questions of late, I have created a search page for the docs: https://www.freepascal.org/docsearch/docsearch.html This will search in the manuals, and in the…
- How to find address of record member4
Say I have a record type defined like this: TAppData = packed record //Total 8 bytes per app ActiveToken: word; //Matches constant for app if active Option: word; …
- Benchmarks0
Has anyone benchmarked the new AMD Ryzen vs Intel chips with FreePascal. 10 years or so ago, I had a multi core AMD Desktop and an Intel based laptop. With…
- Embedding DLL into EXE for Windows 32 bit?5
Is it possible to embed a DLL into the EXE file such that only the exe needs to be distributed? I need to use a 3rd party protection dongle in my programs. The maker…
- Interrogating external devices using USB2
I have multiple amateur-radio transceivers which may be programmed with computer software through a USB cable connection. There already exists various software…
- Is this the correct way to configure fpc for multiple arm-embedded subarchs?15
I am looking for an easy way to have all cortex-m compilers available at the same time to be able to do automated building/testing Inspired by the -V parameter of fpc I…
- fpdoc error with XML parsing5
What is illegal about this fpdoc XML project file? fpdoc from FPC 3.1.1 keeps giving an exception error reading the XML document. The issue it has is with the XML…
- Re: TFPGObjectList error34
this seems to be misleading error message. TFPGObjectList works well for objects (classes). When I tried to push record to it, I got the same error message. TVec3…
- FPC_PCHAR_LENGTH dog slow5
I was just parsing something and found that a call to length on a pchar was taking 90+% of the time in FPC_PCHAR_LENGTH. Why is that so crazy slow? Does it need to…
- Split stream into words10
What's the easiest way to split a stream into words ? Words are just that: words, but - here is the caveat - they must support unicode. So Michael and Michaël are both…
- Daemon using TTimer on Windows10
I need to build a daemon app on Windows. It will need a timer to performe some tasks. This timer could be big among 15 min, 30 min, 2 hours, etc. I thought that I can…
- List of chars for case6
Is there a way to make a constant for a list of chars which I can use in a case statement? I’ve got a bunch of code duplication happening I’d like to clean up. const…
