fpc-pascal · 2011-10
- Delphi's anonymous functions in Free Pascal124
Does Free Pascal have anonymous functions that you can pass around, e.g. to a sort(compare : function, arr : array) function? If not, does anyone know any hacks to…
- 3-tier database applications with FPC14
Just over 3 years ago I asked about FPC support for creating 3-tier database applications. The answer was basically: it's not possible (unless you roll your own Midas /…
- Premature end of headers using fcl-web and POST19
So I advanced my CGI using HTTP GET so far, but I'd like to migrate to HTTP POST. But I always get this error message in the apache logs: Premature end of script…
- How can I implement "thrice" in Free Pascal?37
Haskell lets you define functions like thrice, which accepts an element of type a and returns a list of the element repeated three times, for any data type a. thrice ::…
- A linking error when compiling with FPC 2.4.413
I have installed FPC 2.4.4 using the following package: http://mirrors.iwi.me/lazarus/snapshots/fpc-2.4.4-1.i386.deb.tar Having unpacked it in a folder, I did: sudo dpkg…
- Re: using a unit from an old version of fpc1
Directly including it in the uses clause is not possible. Linking it might be possible with certain limitations, but it is fairly difficult and implies some amount of…
- XML - How to set and use a Namespace Prefix?0
I'm trying to create an XML Document with multiple Namespaces. With the code below[1] a get as result the following XML: <svg xmlns="http://www.w3.org/2000/svg" /> How…
- Debugging cgi applications0
Atached is a small unit that makes debugging cgi applications easier. When used in a program it will as part of the initialization launch a new process which opens a…
- FPC MemoryDataset1
Hi! Sometime ago I submitted a patch that makes the FPC Memory DataSet compatible with Delphi to make it usable on both IDE's by project PascalSCADA. The class TDataset…
- text.inc(1955, 20) Error: identifier idents no member "CodePage"16
I got this error when I tried to compile FPC 2.7.1 rev 19546. ------------------------------------------------------------------------------------------------- make[7]:…
- How to insert a record and get the primary key with sqldb?60
Yet another chapter of my database problems =) Ok, now I want to insert a record in my table and I would like to obtain the auto-generated PrimaryKey I tryed a number of…
- Indy 10 HTTP Server component with FPC5
Is anybody here using the Indy 10 components with FPC? More specifically, the HTTP Server component. My project compiles fine, but when I activate the HTTP Server I get…
- How are Assigned, Free, Nil and Destroy related?17
This is one question I have wanted to ask for a long time. How are Assigned, Free, Nil and Destroy related, and when is one or another appropriate? What other procedure…
- FPC has multiple HTTP server components2
I was looking through the FCL code and noticed that there seems to be more than one HTTP server component. What is the difference between them, and which one would be…
- sqldb how to find a record fast with primary key12
I am using sqldb to connect to a postgres database. Using wiki instructions, my final object is a TSQLQuery for each table. So, this basically is a TDataset and to read…
- Why do string indices start at 1, but array indices start at 0?6
It's inconsistent and ripe for bugs. Andrew Pennebaker www.yellosoft.us
- Format() directives2
In the future, could Format respect the difference between '%x' and '%X'? It's useful to use the former for lowercase hexadecimal. Andrew Pennebaker www.yellosoft.us
- Unicode function names3
Out of curiosity, I've just tried creating a function named ⍳ (Unicode character 2373, i.e. the APL iota function). FPC trunk complains Fatal: illegal character…
- Reopen issue 20500: TSQLParser cant Parse Statements containing "as"3
The issue reporter gave this example: select ORDERNO as OrderNo from ORDERS as Orders; It does parse AS, but only for a field. Michael Van Canneyt replied: TSQLParser…
- Compiling sources obtained via SVN4
I assume there's an expectation that the sources downloaded from trunk should compile on all platforms? I've just updated to 19505, and attempting to build on Linux Mint…
- Stack corruption setting UnicodeString Char5
Usually when we work with PChars we do things like this to set the final terminator: var ansistr: ansistring; begin // Copy the originating string taking into account…
- Getting Hardware information in Linux8
I'm trying to figure out how to get hardware information about the machine i'm running at in Linux OS. For example: hard-drive size, manufacture etc... BIOS information,…
- CGI under Freepascal3
I am trying to use CGI with Pascal. I don't have background in web development, but principles of CGI seems to be simple. The first way could be FPWeb. However, I prefer…
- fpc has trouble with array types8
But, but, the docs imply that this is the syntax for a function that returns an array of bytes. fpc ios7crypt.pas ios7crypt.pas(3,25) Error: Type identifier expected…
- fpweb and reading the contents of a request12
I am trying to send data from javascript and read data back from my cgi module with this: SendSyncRequest = function(RequestURL, RequestContent) { var request = new…
- fpweb and custom debug log1
I see that when my CGI raises an exception we get a nice error message with a stack trace as a response. Is it possible to put some logging messages into this error…
- Any command line interpreters for Free Pascal?36
E.g., if fpi existed, I would add a shebang like this to my code: #!/usr/bin/env fpi Andrew Pennebaker www.yellosoft.us
- More Filter Madness13
Mine is more of a *programming *problem, rather than one native to Pascal, but here goes: I have a text file with many Double values. Looking more or less like below,…
- RE : Problem passing pointers to "hidden" procedure0
On Sat, 15 Oct 2011 09:24:36 +0200 "Ludo Brands" wrote Oops! Silly me. But some kind of complaint from the compiler would have been helpful! Andrew Bennett
- Problem passing pointers to "hidden" procedure2
As part of an attempt at multi-threading, I have had to move many things that used to be global into the Implementation parts of units in order to enforce privacy. When…
- How do I load external Pascal code?15
If I were using C, I would type: #include "code.h" If I were using Python, I would type: import code What's the command to load code in Pascal? And where do the load…
- Stunnel replaced by FPC?2
For my remote assistance screen sharing project https://bitbucket.org/reiniero/checkride/ I'm currently using stunnel on Windows to tunnel VNC traffic over an SSL/TLS…
- FPC 2.4.4 - Error: Illegal type conversion: "Set of TMySet" to "Byte" ... and vice versa1
I am trying to compile my code which is compatible with Delphi and FPC 2.5.1+, but when I try to compile on Mac OS X with 2.4.4 I have error message: Error: Illegal type…
- List of Integer/Double etc3
Hi, I'm wondering if the rtl or a standard package includes classes for handling lists of Integer, Double, and other types. Similar to TStringList, but for numerical…
- Making a cross-compiler for STM328
I'm trying to make a crosscompliler for STM32 (arm-embedded) on my linux-machine. I just downloaded a daily development snapshot and compiled it with : make clean…
- OT A bit, will you vote for this feature request for FB ?0
I have created a feature request for Firebird SQL, to add support for multibyte characters when dealing with the string functions in FB.…
- Reusing a TProcess object (issue 19997)1
Is it allowed to execute a TProcess object more than once? And if yes, different command lines be used? The reason I ask is issue 19997, each invocation of the compiler…
- Writing generic enumerator1
Is it possible to write one? Due to the nature of enumerator, the iterator and iterated class usually form mutual dependency. With normal classes, this is no problem as…
- Linking to C++ DLL compiled with MSVC5
I've been trying to link to an external DLL which is unfortunately compiled using MSVC in C++ mode. The functions itself do not use any C++ features, they are just not…
- Windows API translation - or better way to update system tray?2
(See http://lazarus.freepascal.org/index.php/topic,14847.msg79038.html#msg79038 for initial question) My program starts and stops external programs that have icons. It…
- [Semi-OT] Git format patches don't seem to work29
Having some trouble creating patches that actually work. (On Windows) I've been using git to get FPC trunk and git diff --no-prefix > %temp%\mypatch.diff rem --no-prefix…
- What about complex numbers?8
Hello Is complex number arithmetic possible in FPC? Another post recommends use unit so named ucomplex, but i can't find any detailed information of this in the…
- freetype unit + unicode8
I am using the freetype unit (with linux) and would like to display some interesting unicode characters. However when I pass a string containing say U+2265 to…
- Error when translating a C header3
I tried to translate a C header with: h2pas -e -d -p iupkey.h I got the following error: at line 21 error : syntax error at line 41 error : syntax error Illegal…
- 2
- Does FPC support fields which are only accessible from the object itself, eg. some kind of super private fields1
Private allows access to procedures which the unit, even if they belong to a separate object. Does FPC support fields which are only accessible from the object itself,…
- fcl-extra ServiceManager doesn't seem to working with unelevated Windows account?2
First wanted to check with you if I'm doing something wrong. Using the ServiceManager unit (Windows only), I'm trying to find out if a service is running (Vista x64). I…
- Cannot build RTL for native NT4
These were the steps I did (based on http://wiki.freepascal.org/Target_NativeNT) 1. Check out svn.freepascal.org/svn/fpc/trunk (revision 19048), put it into…
- FPC 2.5.1 (trunk rev 18036): Can't find unit fastcgi used by custfcgi13
I got an error trying to compile FPC 2.5.1 (trunk at revision: 18036) on WinXP-SP3. Before update, I ran 'make distclean'. Console output: [snip] Start building package…
- Error crosscompile on WinXP: FPC /branches/fixes_2_6 rev 193360
On WinXP I can compile FPC /branches/fixes_2_6 rev 19336 to i386 but not to x86_64 I think the argument "-dGDB_V606" should be changed... but is this a new option or a…
