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

Creating text editor like EDIT on Command Prompt using FreePascal

I want to create a texteditor for my DOS program. I want to create it using FreePascal Compiler. Anybody know the logical programming for create it?
-2
votes
3 answers

System() function in Pascal?

I need the functionality of C++ function "System()" in my Pascal program. Is there any possible way of using it or sth similar? For example I want to imitate the C++ function: System("COLOR fc");
Hooch
  • 28,817
  • 29
  • 102
  • 161
-3
votes
1 answer

How to set specific Date to the DateTimePicker in Pascal(Lazarus) ? I need set a 01.01.1991 for example? Can't find info about it

Certain date into DateTimePicker (Pascal) How to add a certain and specific date into DateTimePicker in the Pascal/Lazarus ?
Olek
  • 1
-3
votes
2 answers

How to compile pascal file without IDE

I need to compile .pas without IDE on Windows. How can I do this via cmd?
Nulltiton
  • 25
  • 2
  • 3
  • 12
-3
votes
1 answer

Program Throwing Unknown Error: EConvertError

I am trying to create a program that takes a users input and checks if its valid as a date (years 2000 - 2099). when I was bug testing the code I put in an enter as the input twice in a row, the first time I entered an enter, no error was thrown but…
-3
votes
1 answer

Free pascal can't write to a text file

I'm trying to write something to a text file in free pascal, but it doesn't write anything. Here is my code: program start; uses crt; type txt = file of string; var h : string; f : txt; begin assign(f,'hey.txt'); rewrite(f); …
huck dupr
  • 36
  • 5
-3
votes
2 answers

Pascal | Initializing variables

The following syntax examples are incorrect ways to initialize a variable in pascal: var current: string = '1.6'; Error message: Column 21: Semicolon (;) expected. var current: string; current = '1.6'; Error message: Column 1: Duplicate identifier…
Varest
  • 57
  • 1
  • 11
-3
votes
2 answers

Function steps in pascal

I have the following code, the result is 42, but why? The answer must be 13, because 7+6=13. program HelloWorld; function F (a : integer) : integer; begin if (a = 1) or (a = 2) then F := 2 else F := F(a-1) + F(a-2); end; begin …
Clarys
  • 37
  • 1
-3
votes
1 answer

Fatal: Syntax error, ")"expected but identifier found

TOTAL [X] := (0.1 tomat*harga tomat ) + (0.2 cabe*harga cabe) + (0.3 kol*harga kol)+ (0.4 ikan*hargaikan)+ (0.5 tahun*hargatahu) + (0.6 tahu*harga tahu);
-3
votes
1 answer

'BEGIN' expected but 'USES' found

Hi I've done these lines of code on freepascal: type bigNum=string; function bigMod(a:bigNum;b:longint):longint; var i,hold:longint; begin hold:=0; for i:=1 to length(a) do hold:=(ord(a[i])-48+hold*10)mod b; bigMod:=hold; end; uses…
-3
votes
2 answers

What is an exit code 201 in Free Pascal?

I have tried to make a simple snake game with Free Pascal, when I started the programme, it drew the map exactly what I want but after that, I pressed the button that I have set to control the snake and it exited with exit code 201. I don't know…
Nam Anh
  • 1
  • 1
  • 1
-3
votes
2 answers

Lazarus link failed on Linux Mint 18.3 Cinnamon

I am new to Linux Mint, Lazarus and fpc. I installed Linux Mint 18.3 Cinnamon and Lazarus v1.8.0, found it needed fpc and fpc-src, then installed fpc 3.0.4 and fpc-src 3.0.4, launched Lazarus without problem, then tried to run a simplest application…
Bochen Lin
  • 413
  • 4
  • 12
-3
votes
1 answer

How do use destruct and create correctly

I have a Form. When the user clicks the TESTBUTON an array is generated (here with a loop) and an array is filled. (that works). Now the user will be able to change some parameters an hit the button again. Than I want to clear / free / destroy the…
ratmalwer
  • 700
  • 5
  • 14
-3
votes
1 answer

can i use case inside if statement in pascal

I want to using case on if statement, can I use it? Because I always got error when i compile it ;w; Error I got: Tahun.pas(26,21) Fatal: Syntax error, ";" expected but "ELSE" found Tahun.pas(0) Fatal: Compilation aborted Here my code: uses…
Clesuka
  • 3
  • 3
-3
votes
1 answer

Access Violation when trying to allocate memory to a pchar

I've been working on a money management program in freepascal for quite some time and recently started to use pointers to resolve some limitations. It works fine 90% of the time. I'm trying to debug an EAccessViolation that seem to happen at random…
paiiburn
  • 1
  • 2