freepascal Questions
2
Solved
Consider the code:
procedure DoSmthSecret;
var
Seed: array[0..31] of Byte;
begin
// get random seed
..
// use the seed to do something secret
..
// erase the seed
FillChar(Seed, SizeOf(Seed),...
Washedup asked 2/3, 2016 at 9:35
0
Another discrepancy between Delphi and FPC BASM:
program PopTest;
{$IFDEF FPC}
{$mode delphi}
{$asmmode intel}
{$ELSE}
{$APPTYPE CONSOLE}
{$ENDIF}
var
B: LongWord;
procedure Pop(A: LongWord...
Transmigrant asked 30/12, 2015 at 9:24
2
I am a student in Computer Science, and I am learning programming with Pascal.
I have found an interesting Pascal compiler, P4 (http://homepages.cwi.nl/~steven/pascal/).
To know more about Pasc...
Optimistic asked 28/4, 2015 at 6:44
1
Solved
I am now trying to explore pascal. And I ran into some compiler errors. I wrote a if else if statement like this:
if ((input = 'y') or (input = 'Y')) then
begin
writeln ('blah blah');
end;
el...
Nonego asked 4/10, 2015 at 11:40
4
Solved
I'm having some problems addressing logical drives. For clarity, my definition of 'Physical Disk' (PD) is the raw disk regardless of partitioning. 'Logical Drive' (LD) refers to a volume such as Dr...
Downbow asked 5/6, 2015 at 16:26
1
Solved
What's equivalent of std::vector, std::deque and std::map in ObjectPascal (FreePascal compiler)?
In brief:
(vector) is an auto-resizing contiguous array
(deque) is an auto-sizing hybrid array o...
Carr asked 18/3, 2015 at 5:32
4
Solved
I am attempting to convert a GUI application that I made in Delphi (actually, its Lazarus) to a library(DLL).
In the GUI application I used a OnDataChange event listener, but I cannot seem to figu...
Pikestaff asked 5/9, 2011 at 13:52
4
Solved
Besides MSXML and SAX for Pascal, can you recommend a SAX parser for Delphi? It would be great if it could be used in cross-platform applications with Free Pascal.
Waterloo asked 27/8, 2010 at 5:23
3
Solved
After replacing hard type casts of AnsiString to TBytes (array of string) with a ToBytes method (see below), Delphi reported no memory leaks - Free Pascal 2.6.2 however shows a leak in case the TBy...
Balsamiferous asked 4/3, 2014 at 19:39
3
Solved
Is there a compiler define that tells if source code is compiled with delphi, in the sense of an equivalent to the FPC define in Free Pascal?
I am developing a unit that should be compatible with ...
Altostratus asked 16/1, 2014 at 23:29
2
Solved
How are pascal strings laid out in memory?
I read: http://www.freepascal.org/docs-html/ref/refsu12.html
It says that strings are stored on the heap and reference counted. To figure out where the l...
Linnie asked 5/1, 2014 at 5:58
2
Solved
Does anyone have a Delphi / Pascal example for calling the below OpenSSL functions...
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/openssl/src/openssl.pas?revision=17634&view=ma...
Blubberhead asked 15/3, 2012 at 16:28
2
Solved
I am trying to copy part of a Treeview to a popup menu, and am not having any luck at all I just cannot seem to get recursion to work and I know I am probably doing it all wrong.
Take this example...
Middlebrow asked 14/9, 2013 at 13:36
1
Is there a simple explanation of Wirth's source code or even a version with a little more commenting so that I can figure out how it works?
Wirths pl/0 compiler is here: http://www.moorecad.com/st...
Excellency asked 5/8, 2013 at 4:10
2
Solved
I have some Delphi/assembly code that compiles and works fine (XE2) for Win32, Win64, and OSX 32. However, since I need it to work on Linux, I have been looking at compiling FPC versions of it (so ...
Accommodate asked 15/5, 2013 at 8:6
3
Solved
I have done a little work on lazarus' free pascal. So when a client asked me to write an application for a mac, after the initial, "it can't be done" stage. (followed by an asp.net maybe stage) i t...
Heptagonal asked 18/9, 2011 at 17:26
2
I have started to convert the Webview interfaces to be consumed in Delphi. I have managed to get the webkit library to load, and the interface methods that is called appears to work correctly, howe...
Trimly asked 16/3, 2012 at 4:16
1
Solved
Is there ANY way to get pixel color under mouse cursor really FAST? I have a mouse hook and I try to read pixel color during mouse move. Its kind of ColorPicker
Any attempts with getPixel and BitB...
Scrimpy asked 1/3, 2013 at 10:29
3
In a Linux Free Pascal 2.6.0 console application, a HTTP server is started and runs in a separate thread, so the call to Start will immediately return.
begin
...
MyHTTPServer.Start;
...
WriteL...
Khano asked 30/12, 2012 at 12:27
2
Solved
The following code runs as expected in my system, but I'm not sure whether the P variable is guaranteed to have the same value after MyArray[0] is changed to a new value.
procedure Test;
var
MyAr...
Acclimate asked 29/12, 2012 at 6:32
2
Solved
I'm working on calling functions from a Delphi compiled *.so file from a Java program. After some research it seems like JNA is he way to go. Before diving into some complex Delphi code, I'm trying...
Ephram asked 27/12, 2012 at 15:40
2
Solved
I need to implement simple performance benchmarking in Free Pascal. In Delphi I am using TStopWatch record from Diagnostics unit, what can I use in Free Pascal/Lazarus?
Cambium asked 18/12, 2012 at 6:13
4
Solved
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 manua...
Aeolotropic asked 17/10, 2012 at 16:44
1
Solved
I got bitten my first sql escaping error (it was long overdue) when I tried to execute the PostgreSQL query below with a value containing an apostrophe eg. O'Brien, using FreePascal and Lazarus
SQ...
Thulium asked 1/11, 2012 at 4:42
2
Solved
In Delphi, I usually write a simple leak test like this:
program MemLeak;
{$APPTYPE CONSOLE}
uses
SysUtils;
procedure Leak;
begin
{ Put leaking code here. }
end;
begin
ReportMemoryLeaksOnSh...
Lati asked 14/10, 2012 at 4:20
© 2022 - 2025 — McMap. All rights reserved.