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
-2
votes
1 answer

While loop executing once(?)

I've been writing this hangman program in Pascal and I've been looking at this problem for a while and getting nowhere. I originally thought the input was reading a \n too, but a bit of write() later and that wasn't the case. what happens when I…
roflcopter1101
  • 283
  • 1
  • 6
  • 20
-2
votes
1 answer

lazarus/pascal write filename with current date

i need to write a file with the filename containing the current date.. everything works besides the date, it gives a class exception 'run error(3)' (the importo.text is the text of a TEdit.. but i guess it's irrelevant) uses Classes, SysUtils,…
user5208539
-2
votes
1 answer

Read / write different Records data from / to Untyped files in Pascal?

I've a programming project in my college. Using a File type for storing data is allowed, and I did exactly like this one: pascal-programming And, here's what I achieved so far: I tried to write the Records data into Untyped files instead and it…
mochadwi
  • 1,190
  • 9
  • 32
  • 87
-2
votes
1 answer

Taking Valid Enumeration DataType Input via Loop

I want to take a valid enum data type input from user. An I tried like this. FPC Compiler says only binary datatype cane be compared using '<>' relational operators. Kindly also state in 'Cham_Cham' can I Use Space instead of '_' I will not go with…
user3051677
  • 147
  • 14
-2
votes
1 answer

Exception class 'External: SIGSEGV '

I am making simple encrypt/decrypt program in Lazarus with 2 buttons, one for encrypt and one for decrypt. I also have two memo boxes (or just two memos ). I tested my algorithm and it works but when i tried implementing it in user friendly app i…
user6948476
-2
votes
1 answer

Reading real content of pascal's binary file

I want to know the real content of binary file. File was created by Deplhi (FreePascal?) based application. Filename is FDane.bin I don't have source code of this app After disassembling application i see that (part of disassembled code that…
dymbol
  • 3
  • 1
-2
votes
1 answer

Prime factorization in pascal as a function/procedure

I have to build a prime factorization program with pascal using a function or procedure. I think I am on a pretty good path, but my problem at the moment is, that it seems to be impossible to assign a dynamic relay as the ouput of a…
-2
votes
2 answers

Change title bar color and buttons

I would like to change title bar in my application. I have no idea how should I do. Can you help me? I found many examples in Delphi but doesnt work in Lazarus. How should I start, what I should do to change for example title bar colour or buttons?
Mlody87
  • 425
  • 1
  • 7
  • 19
-2
votes
1 answer

How to compile Sun Pascal's module to its equivalent in Free Pascal?

I have a program written in Sun Pascal, which consists of a program unit and several module units, and I want to convert it to Free Pascal now. So I started by testing the example in Sun Pascal 3.0.2 User's Guide(p. 52,…
erical
  • 345
  • 1
  • 6
  • 13
-2
votes
1 answer

Right Click MainMenu

Having problems with making so when you use right click on mainmenu or Form1 it works and open the specific submenu with Forest,Sea,Clouds and ignores the Pictures ,Exit Menu. Here you cans see the MainMenu: unit Unit1; {$mode…
Deivids
  • 45
  • 1
  • 5
-2
votes
1 answer

Lazarus/Delphi: Msg.CopyDataStruct not recognized

I'm new to Delphi and I try to write an experimental plugin for a program in Lazarus. I found a free source code from a different plugin and I try to base on it. My plugin should received the message sent by the program and insert a string into an…
Krzychu
  • 121
  • 7
-2
votes
2 answers

How to interface OPC UA Server from Delphi application?

While there are plenty of Delphi OPC-DA Client components (commercial and open source), I can't seem to find Delphi component for OPC UA. In the absence of a Delphi OPC UA solution, should I look into using an OPC-DA to UA gateway? EDIT Native…
Joshua
  • 1,709
  • 2
  • 24
  • 38
-2
votes
1 answer

Input Variable Type Validation

The program for the 2015 skeleton program has some major validation issues in particular input type validation. For this procedure, how would ensure that the user enters SOMETHING and an INTEGER. Procedure code: Procedure GetMove(Var StartSquare,…
EnglischerZauberer
  • 237
  • 1
  • 2
  • 11
-2
votes
1 answer

Strange behaviour when simply adding strings in Lazarus - FreePascal

The program has several "encryption" algorithms. This one should blockwise reverse the input. "He|ll|o " becomes "o |ll|He" (block length of 2). I add two strings, in this case appending the result string to the current "block" string and making…
-2
votes
1 answer

FreePascal adding elements on binaryTree

So im trying to add all 'spent' data, belonging to specific client number, on a binary tree. Type pointer_tree = ^bTree; bTree = record nclient: integer; spent: integer; big, small: pointer_tree end; {adder is 0} function add…
Norm Matt
  • 3
  • 1