Questions tagged [object-pascal]

A superset of the Pascal language that includes Objects, Classes, Generics and other object-oriented devices.

Filter by
Sorted by
Tagged with
2 votes
0 answers
15 views

Recording/Playback thread device in Object Pascal

I have developed an audio recording and playback base device in Free Pascal. This device is built on Free Pascal's TThread class and utilizes the low-level audio ...
cpicanco's user avatar
  • 499
2 votes
3 answers
110 views

Efficiently calculate the value of an arithmetic sequence

I need to calculate the value for the following function: $$f(n) = -1 + 2 - 3 + ... + -1^n$$ The time limit to calculate a given value of \$n\$ is less than 1 second. My approach does not meet that ...
CouldnoT B-Zone's user avatar
3 votes
1 answer
634 views

Basic Color class for both Delphi and Lazarus

Intro If you want to know, then about 10+ years ago, I started a journey on the (best in my country) color picker for WinXP, later Win7. Since now it is hardly compatible with Win10 and HiDPI (work in ...
Vlastimil Burián's user avatar
4 votes
1 answer
485 views

Parsing a command line

I've written an object which allows parsing and serializing a command line. I don't in any way consider this done, but this is the beginning of it. I know there are other implementations out there ...
Jerry Dodge's user avatar
2 votes
1 answer
1k views

Buttons switches in Delphi

I have an action on four buttons. I need to make a down (checked) button if it's pressed and other buttons up (unchecked). My button is TToolButton and the property ...
Roman Marusyk's user avatar
4 votes
0 answers
957 views

Multithread debug logger for Free Pascal / Lazarus

Debug experience can be much improved in the Lazarus development interface. Please, if you use this free development environment and have the same felling, do not consider this affirmation simply as a ...
cpicanco's user avatar
  • 499
2 votes
0 answers
596 views

Class derived from TXmlIniFile to save/read to/from XML

I have created this unit containing a class derived from TXmlIniFile. This class uses the common TCustomInifile methods to write to and read from an XML file. It comes from an idea of Chris Rolliston ...
user1580348's user avatar
3 votes
0 answers
112 views

Single level of abstraction

I am reading the "Clean Code" book and trying refactoring my source code according to the principles "single level of abstraction"/"separation of concerns". How would you refactor the following code? ...
Ruben's user avatar
  • 31
10 votes
1 answer
500 views

Sync eye movements with external events

This solution was used to synchronize events between two applications: An eye tracking software, Python, and a stimulus control software, object Free Pascal/Delphi. It avoided a rewrite of the ...
cpicanco's user avatar
  • 499
2 votes
2 answers
1k views

Thoughts on my byte array library

Here is a small library which manages writing into and reading out a byte array. It uses TValue arrays to get and put data, its my first time using them. Its crudely written, and poorly optimized but ...
Umair Ahmed's user avatar