Questions tagged as 'pascal'

1
answer

Doubts with generating random values

I have a question about a college job I've been doing. It consists of creating a naval battle game, in PASCAL. I am using the content of this link as a guide to writing the program: link The question is, how do I determine how many posit...
asked by 06.07.2014 / 13:31
2
answers

Special characters in Excel spreadsheet generated in Delphi

I found on the internet many codes related to generating EXCEL worksheets in DELPHI. Here is the code I'm using: objExcel := CreateOleObject('Excel.Application'); objExcel.Visible := True; objExcel.Workbooks.Add; objExcel.Workbooks[1].Sheets....
asked by 03.08.2015 / 15:09
2
answers

Generate Pascal code text file

I have a pascal code. It is as follows: Program Pzim ; var i:integer; vect:array[1..1001] of integer; Begin i:=1; for i:= 1 to 999 do vect[i]:=i+1; for i:= 1 to 999 do writeln (vect[i]); readln; End....
asked by 13.02.2016 / 22:46
1
answer

Use data from an array in a Report

I have an array like this that is being populated in runtime: MatSort[0][0] - Nome1 MatSort[0][1] - InfoNome1 MatSort[1][0] - Nome2 MatSort[1][1] - InfoNome2 But I do not know how to reference the data in this array in fast-reports so that...
asked by 18.09.2017 / 19:31
1
answer

Creating real-time TEdit and OnEnter action

Lately I've been developing a mobile app, and I need to create a real-time%% with the predefined action function. So far I can create, but without the TEdit action function. Here is the code: procedure CriarEdit; var tipo:TForm;...
asked by 27.10.2014 / 23:22
1
answer

How to implement the Dijkstra algorithm in Pascal?

I'm trying to implement the Dijkstra algorithm by creating a function in Pascal. I have something like: function Dijkstra(L:mapa):integer; begin min := max ; map.mini:= 0; for i := 2 to min do if L.matriz[i,j] < map.mini t...
asked by 15.11.2014 / 13:17
0
answers

Check if program was compiled for 32 or 64 bits

Good afternoon, I'm setting up my fpc here for cross-compilation and would like to make sure it is working properly, I want to do a test program and compile on each platform, then check if each executable has been compiled to the correct platfor...
asked by 23.10.2017 / 20:27
2
answers

Avoiding two processes of the same application in Pascal

What is the most feasible way to identify the processes of my application in memory and terminate them if there is more than one execution. I use the Lazarus IDE platform (looks like Delphi), which supports the object-oriented Pascal programming...
asked by 09.12.2014 / 03:43
1
answer

Frame Replication [Error: Component already exists]

I have a form in delphi and wanted to click a button a pre-created frame was added dynamically several times. I'm trying through this code: procedure TMain.Button1Click(Sender: TObject); var i:integer; frame:TFrame; begin for i:=0 to 5 do...
asked by 20.12.2016 / 19:23
2
answers

Add to Text File Using Pascal

I made this algorithm in Pascal which feeds numeric information into a text file. program Pascal; var i:integer; Vect:array[1..1001] of integer; Myfile: text; begin i:=1; for i:=1 to 999 do vect[i]:=i+1; Assign(Myfile, 'My...
asked by 15.02.2016 / 15:30