Pascal is an imperative language from the Wirthian family created in 1969. It lives on in compilers like Free Pascal and Delphi.

learn more… | top users | synonyms (1)

11
votes
1answer
236 views

Human-like mouse movement

The code will move the mouse from a start point (xs, ys) to finish point (xe, ye) like a human would. I'd like some help possibly shortening the code (by optimizing it) and making it more readable. ...
7
votes
1answer
63 views

Auto-click the sequence

The following pascal script needs a bit of context for it's purpose to be understood. For those who don't give about purpose, feel free to skip ahead. Background A game I'm terribly fond of has a ...
2
votes
1answer
67 views

Giving money to the bank

Lets say we need to write an algorithm for giving money to the bank. We need to know interest rate, money which we put every year on our account, and amount of money we want to get. F.e int. rate is 1%...
3
votes
1answer
91 views

Binary and linear search methods for a number-guessing game

This is a code written is Pascal (Delphi). It asks the user to think of a number between min_ and max_ and then guesses the ...
3
votes
1answer
87 views

Pass the password back

This code simply receives a very basic 'password' (numbers, letters, nothing fancy). After you press enter, it will display it back. The only special key I'm handling is backspace (code ...
4
votes
2answers
67 views

Generating Position

I'm written the following code to calculate the position of a motor during each timestep, the result of which will be compared with feedback from a quadrature encoder and subjected to a PID algorithm. ...
3
votes
1answer
57 views

Yellow Pages Search

I've written code in Free Pascal based on a contest problem (The contest insists that I have to write with Pascal). It works like charm, but I think it still need some improvements, from memory usage ...
3
votes
2answers
59 views
3
votes
0answers
327 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 ...
3
votes
1answer
4k views

Function to split text

The following pascal function (compiled with Delphi) will split strings. It works perfectly, but how to improve the code? For example, to avoid using the repeat-until loop. ...
9
votes
1answer
386 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 ...
7
votes
1answer
266 views

Enhancing speed of looping cycle using Freepascal

I use Lazarus 1.2.4 and Freepascal 2.6.4. I have created a program that reads a disk in buffers of 64Kb (tried various buffer sizes) using a repeat...until loop. Each buffer is hashed using the SHA1 ...
7
votes
1answer
135 views

Drawing and Painting a Menu Component

I have produced a working menu component for a project I'm working on, but would like to reduce the amount of code used and improve the methods - especially in the Paint implementation - still further,...
7
votes
1answer
198 views

Eight Directions Crossword

I solved a problem which you can read about here, but it gives me "time limit exceeded" even though it runs in 4 seconds. I really don't understand why. I don't think my code can be any simpler, ...
3
votes
1answer
188 views

Painting Tom Sawyer's Fence - programming on Free Pascal

Tom Sawyer has many friends who paints his fence. Each friend painted contiguous part of the fence. Some planks could stay unpainted, some could be painted several times. Program must output the ...
6
votes
2answers
654 views

Querying MySQL from an external application

I have a database that I need to query over and over as fast as possible. My queries execute pretty quickly, but there seems to be some additional lag. I have a feeling that this lag is due to the ...