Questions tagged [freepascal]

Free Pascal is a multi-dialect, multi-platform Object Pascal compiler. Originally started to replace the retired Turbo Pascal compiler, it now attempts to follow the Delphi dialect still being developed by Embarcadero Technologies. It has compiler modes for Delphi, Turbo Pascal and Mac Pascal. It also has two modes for its own superset dialect: One mode with exceptions, classes and interfaces, and mode one without.

Free Pascal is a multi-dialect, multi-platform Object Pascal compiler. Its main focus are the Delphi and Turbo Pascal dialect, but a substantial Mac Pascal subset and a minor ISO Pascal mode exist as well.

Free Pascal is available for most common architectures and operating systems.

http://www.freepascal.org

1338 questions
9
votes
2 answers

Delphi Data type too large: exceeds 2 GB in Berlin Update 2

I have a unit which is for both Delphi & Lazarus. In Lazarus the unit compiled without any exception but in Delphi it gives me Error Data type too large: exceeds 2 GB. Below is the code: unit UType; {$ifdef FPC} {$MODE…
shariful
  • 455
  • 1
  • 9
  • 21
9
votes
2 answers

Could Free Pascal benefit of something like Apache Maven?

Apache Maven is a very popular build and dependency management tool in the Java open source ecosphere. I did some tests to find out if it can handle compiled Free Pascal / Delphi units and found it easy to implement. So it would be possible to…
mjn
  • 36,362
  • 28
  • 176
  • 378
9
votes
2 answers

Does Freepascal really use *far* less memory than gcc

The language shootout benchmarks at http://benchmarksgame.alioth.debian.org/ indicate that FPC programs use about 1/50th of the memory that comparable programs using g++ use. Do these benchmarks unintentionally favor fpc or is it really true that…
Sudarshan S
  • 1,235
  • 2
  • 16
  • 25
8
votes
1 answer

Anyone with a C#, Delphi or FreePascal implementation of the PRESENT Ultra-Lightweight Block Cipher encryption?

A short while ago a paper got published on PRESENT: An Ultra-Lightweight Block Cipher by Andrey Bogdanov et al becoming ISO standard 29192-2:2012. Is there anyone that has a C#, Delphi or FreePascal implementation with unit tests? This was asked…
Gustavo Carreno
  • 9,499
  • 13
  • 45
  • 76
8
votes
1 answer

What's the syntax for literal arrays in Free Pascal?

There's a 50-odd hard-coded byte list I'd like to store in a byte array, but I can't find Free Pascal's syntax for hard-coded arrays. Sets use [elem, elem, elem], so what do arrays use?
mcandre
  • 22,868
  • 20
  • 88
  • 147
8
votes
6 answers

Most common docblock for Delphi and/or FreePascal code

I'm quite familiar with PHP dockblocks since it's been my job for the last 15+ years. /** * Description * * @tag bla bla * @tag more bla bla */ What I'm trying to understand is if there is a standard like that for Delphi and/or…
Gustavo Carreno
  • 9,499
  • 13
  • 45
  • 76
8
votes
6 answers

String to byte array in UTF-8?

How to convert a WideString (or other long string) to byte array in UTF-8?
Mariusz
  • 1,825
  • 5
  • 22
  • 36
8
votes
1 answer

FreePascal / Lazarus and implementing nsurlconnectiondatadelegate

I am trying to implement nsurlconnectiondatadelegate as I need to support async mode - in synchronous mode redirects are followed automatically which I do not want. For reference I have the code working in synchronous mode with urlRequest etc. The…
Tom
  • 3,587
  • 9
  • 69
  • 124
8
votes
1 answer

Is there a good Object Pascal mode for Emacs?

I've been doing some Object Pascal lately, and I've been unable to find a good mode for it. I've tried delphi-mode and pascal-mode, both of which try to help too much; when they fail to understand Object Pascal syntax, it's very difficult to force…
JasonFruit
  • 7,764
  • 5
  • 46
  • 61
8
votes
3 answers

Is Indy for FreePascal stable?

I'm starting to play with FreePascal/Lazarus and there appears to be an Indy port available. Is this a recent port and is it stable enough to use in production use? (Standard HTTP post/get client type work, and basic TCPIP server side.) Or, perhaps…
Darian Miller
  • 7,808
  • 3
  • 43
  • 62
8
votes
2 answers

How can I compile 64-bit Mac programs with Free Pascal?

I have an x86_64 library on my Mac compiled by GCC, and I want to link it with Pascal code compiled with Free Pascal 2.4. What options do I give to fpc to make it generate 64-bit code? Without any options, I only get 32-bit .o files. I'm using the…
Rob Kennedy
  • 161,384
  • 21
  • 275
  • 467
8
votes
4 answers

Automatically create Delphi/Freepascal interface unit from C header file

Is it possible to automatically generate interface units from C header files? In particular, I want to wrap the HDF5 library, and it would be great if I could avoid writing the interface unit manually.
andreas-h
  • 10,679
  • 18
  • 60
  • 78
8
votes
2 answers

Predefined symbol to select between Lazarus and Delphi

I am looking for a predefined symbol to write a code like that: {$IFDEF LAZARUS} // code compiles by fpc/lazarus {$ELSE} // code compiles by delphi {$ENDIF}
kludg
  • 27,213
  • 5
  • 67
  • 118
8
votes
2 answers

Programming screen recorder - output issues

I want record screen (by capturing 15 screenshots per second). This part I know how to do. But I don't know how to write this to some popular video format. Best option which I found is write frames to separated PNG files and use commandline Mencoder…
Dibo
  • 1,159
  • 17
  • 34
7
votes
1 answer

What are the differences between implementation of Interfaces in Delphi and Lazarus (FPC)?

We have a project full of custom components that today is working in Lazarus and Delphi. I'm thinking in code interfaces on it, but I am not much familiar with them. What I would like to know is: What are the implementation nuances from Delphi and…
EMBarbosa
  • 1,473
  • 1
  • 22
  • 76
1
2
3
89 90