fpc-pascal · 2009-10
- Does GetLastError in WinCE work?2
Hello I get strange results form GetLasError in WinCe; something like 1449435930, for example; I use this: {$include…
- memory mapped file4
All the good days. You can not tell what I need to read and/or study for solving cross-platform (linux/windows) implementation of the memory mapped file? Thanks in…
- Compiler allows strange statement13
I looked at http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl-db/tests/testfieldtypes.pas?r1=13971&r2=13970 and did not understand the meaning of:…
- bzip2 compression with FPC1
ok, I created a new thread for bzip2. So, FCL seems to have bzip2 unit but it only has decompression. Does anyone know of alternatives for bzip2 compression with FPC?…
- Experimental and Unimplemented directives1
With reference to FPC 2.2.4 Linux, can somebody please explain how to get the compiler to compile code that uses the Experimental and Unimplemented hint directives? An…
- Lazarus 0.9.28.2 released0
The Lazarus team is glad to announce the 0.9.28.2 release. This release is based on fpc 2.2.4. This release can be downloaded from the SourceForge download page:…
- X, Y co-ordinate system under OS/27
I'm porting an OS/2 application to Linux & Windows. From what I can see in the code, it looks like co-ordinates (0,0) is in the bottom left corner of the screen.…
- PChar -> AnsiString -> PChar = memory leak?20
Do I create a memory leak if I cast a PChar it a AnsiString. Then append text to the AnsiString and then cast it back to the original PChar? eg: var Text: Pchar; <--…
- How to set LCL widgetset for my project?8
On the page (http://wiki.lazarus.freepascal.org/Qt_Interface), I read "To compile a project for Qt just select it as the target widgetset on the Compiler Options…
- writing to syslog from FreePascal2
We are porting an application which needs to write to the system log via syslog. We are running under Red Hat Enterprise Linux. Is there an existing mechanism to do…
- fpc and serial port2
Hi May I have a few examples to access /dev/ttyS* using fpc? My purpose is to connect my Arm handheld to a thermal printer connected to /dev/ttyS0. Presently, having a…
- someone using indy10 (tiburon)?4
the indy people seem only to support/work on the Tuburon branch. For me it works on windows. But I have no luck on MACOSX! seems to be a problem with lib-iconv - but the…
- 'Uses' keyword1
Is there any way to get FPC to tell me what units get included when I include a unit? I'm asking because I'd like to know so I can find out what units I'm using and what…
- WORD (2 bytes) to String conversion21
I'm reading in a WORD (2 bytes) from a binary file. I can display the Hex format of that value without a problem, but I would also like to display the String value of…
- streaming child components2
I have another question regarding serialization. I need to stream child components, and here: http://wiki.freepascal.org/Streaming_components it says that "TComponent…
- can not debug on macosx 10.4 ppc5
I am trying to debug an application on my old ppc mac running macosx 10.4.11 with lazarus from trunc. On debugging the app starts, but it does not accept breakpoints...…
- streaming functions in LResources1
I am trying to figure out property streaming a little more in-depth and have a question. I have just started fiddling with it, so please bear with me if I just missed…
- How to translate this C header struct to Pascal10
The first item is 31bit and the second item is 1 bit. Does FPC support a record structure that can define bit level sizes? uint32_t SearchStart:31; // file offset…
- Enhanced RTTI?1
I don't have Delphi 2010 yet and not sure if I'll sit this version out or not, since I'm quite happy with D2009 so I haven't had a chance to play with it yet. Here's a…
- array [boolean] and typecasting fail4
It appears that, in a special case here, the boolean typecast is not being done properly/completely, and thus an array is being indexed out of bounds. If I compile with…
- Sphinx2 headers0
Do somebody used sphinx2 for speech recognition from Freepascal (or Delphi) ??? How? Thanks Horacio
- fpc on solaris 10 x86?0
I find no instructions howto install fpc on solaris 10 x86. Maybe I'm googeling wrong... Yet someone has compiled and some experience? Any help would be appreciated.…
- Creating text files with TFileStream20
How do you create plain text file output with TFileStream? Or is TFileStream reserved for binary output only? I'm using TFileStream as follows; // helper function to…
- Streaming classes?1
I've encountered this mentioned several times in the documentation but I have no clue what its used for or why I would want to use it. Is it talking about reading and…
- Pixel tricks on arm architech, how can I get more?0
I am working on a wince game and want to do some fadein/out works on a vga screen. I use alphablt in IDirectDrawSurface, but it only support a constant 50% alpha. When…
- FPC 2.3.1: undefined reference to `fpc_geteipasebx'2
Hello! I use FPC 2.3.1 to let FPC compile shared libraries with PIC code. (PIC support is broken in FPC 2.2.4) My shared lib compiles successful, but if I compile a…
- Why has StrToDate() failing under FPC 2.3.1 (64bit)16
Compiling the project works fine under FPC 2.3.1 (linux 64bit), but running it, i get a EConvertError and I don't know why. I am telling sysutils what LongDateFormat is…
- Division by Zero: EDivByZero and EZeroDivide19
Is there a reason why in fpc both floating point and integer division by zero raise an EDivByZero exception? See:…
- What about the Foreach statement?1
Have you considered implementing the foreach construct similar to that found in many modern languages? Nino
- Thread Priorities - Linux2
The Linux tthread.inc file in FPC 2.2.4 refers: There is a constant array defined at line 55 that lists 'priority' values which I think are inverted. i.e. Currently, the…
- Who said Pascal isn't popular40
I came across this link by chance. Wow, I never knew there was that many Pascal Compiler implementations. A lot! http://pascaland.org/pascall.htm - Graeme -…
- BNF grammar for fpc20
is a complete grammar for fpc written in some variant of BNF available somewhere? I searched the website and the wiki, to no avail. Marc Marc Santhoff
- (no subject)1
i want to don't send mail to me from you but idn't know how do it. please guide me
- New/Dispose vs GetMem/FreeMem3
Which of these should I use in new projects? I read somewhere that GetMem/FreeMem is actually compatibility methods from Turbo Pascal days, yet I have seen lots of new…
- MySQL12
FPC 2.2.4 OS X 10.6.1 Xcode 3.2 All references to MySQL function are unresolved by linker. libMySQLclient.a is copied to .pas directory. Using FPC test code for MySQL…
- open arrays as parameters (why packed not allowed)?6
I am translating some Pascal code from MetaWare Professional Pascal to Free Pascal. The MetaWare code uses conformant arrays, which are not supported within Free Pascal.…
- pointer arithmetic help required6
Sorry, I suck at this pointers think. Currently I am reading one record in correctly and from there is all corrupted data. :-( Seeing that the first block of data…
- What does TFileStream.Seek() return?4
Based on the documentation shown here, it doesn't mention what the return value is. Anybody have a clue?…
- two small ?s - high(real) and nearest 2^x16
1. Is there a way to get the highest and lowest real values? I can do high(longint) but high(real) gives me an error. Also of interest is a low(real) value (-m * 10^n)…
- Linux IPC (SHM) : Getting Strange Value for shm_nattch (# of attachements)3
I try to get number of processes attached to a specific shared memory segment. So I read the shmctl record to retrieve this into shared memory : type TShmid_ds = record…
- Code conversion question - alloc and dealloc memory4
I'm am having problems allocating memory and then populating that memory with a TFileStream.Read() call. So I thought, maybe my GetMem() call is incorrect. I then looked…
- More OS X problems2
OS X 10.6.1 FPC 2.2.4 Xcode 3.2 (64 bit) Using code base that has complied correctly since 2004 Fixed $MODE OBJFPC Current problems 1) A unit with identical first few…
- Video4Linux access1
I need video4linux support for my new project. I tried vfp unit I found in the contribute units website. But it seems very outdated. Itried all things menitioned in the…
- How to Copy a Record data to a buffer?79
TCommsBuffer = packed record UnitID: Byte; FunctionCode: TModBusFunction; MBPData: TModBusDataBuffer; Spare: Byte; end; { TCommsBuffer } SendBuffer: TCommsBuffer;…
- Lazarus 0.9.28 released1
The Lazarus team is glad to announce the 0.9.28 release. This release is based on fpc 2.2.4. This release can be downloaded from the SourceForge download page:…
- Why use pointers to arrays?10
The other "arrays" discussion got me thinking, and after working so long with only desktop type applications that talk to database API's, I long some knowledge of the…
- Mac OS X 10.6.1 problem2
Using OS X 10.6.1, FPC 2.2.4, Xcode 3.2 on intel iMac. The program and units all have {$I Directives.inc} at top of each file. Compile lists many errors like: 6: Mode…
- Exporting user-defined conditionals1
According to the note in chapter 2, section 2.2.1 of the FPC Programmer's Guide, it is not possible for conditionals to be exported to other units. Is there a way around…
- QueueUserAPC Similar Cross platform Functionality3
I've got a unit I'm porting from Windows to Linux and I came across a QueueUserAPC (Kernel32 Windows) I make to add a callback method that gets executed by the thread I…
- FIONREAD FPC FpIOCtl for Cross platform Sockets2
Sockets programming often requires a poll for how much data is available on a particular socket descriptor. I'm porting an inhouse library for a sockets implementation…
