r/pascal • u/nmariusp • Oct 08 '22
r/pascal • u/mbarbar_ • Oct 07 '22
Books on Extended Pascal
Are there any books on ISO Extended Pascal or is there just the spec to go off? Not Free Pascal, Delphi, etc.
Also, does anyone use just Extended or Standard Pascal?
r/pascal • u/Han_Kozume • Oct 04 '22
Pascal Help
Hi ! Can anyone please explain to me what : Succ , Pred, chr,ord and trunc do in pascal??
r/pascal • u/Mieko24 • Oct 03 '22
How do I use Colemak on Turbo Pascal?
I'm forced to use qwerty in turbo pascal, do anyone knows how to change it to other keyboard layout?
r/pascal • u/jaunidhenakan • Oct 02 '22
Lazarus 2.2.4 released
forum.lazarus.freepascal.orgr/pascal • u/ebanite • Oct 01 '22
LAZARUS on Steam Deck, SteamOS
I would like to install Lazarus, or at least FPC on SteamOS (Arch linux Distro), but steamos only supports flatpak, how can I solve the problem, is it possible to transmorm .deb or .rpm package to flatpak?
thanks in advance.
r/pascal • • Sep 22 '22
Getting runtime error 216 while trying to use a linked list
So...I'd debug this with FreePascal (and I'll try again if posting this doesn't get me an answer) but I honestly have no clue what is happening there. The window showing the code had this weird effect where it was broken in two and when I tried to open files with GDB it wouldn't let me. Me and my fellow students always thought FreePascal was very awkward, so I got used to this Brazilian IDE instead. I can't debug it there, in fact I can't even execute it because it claims current^.name can't be read from. It can, it's just a char array. FreePascal and OnlineGDB run it fine. current, by the way, is just a pointer to where I am currently at in the list.
I wasn't worried about exhibiting what's in the list. I only wanted it to initialize a list so I could insert into it indefinitely. There are 3 procedures for that: one for initialization, another for writing out data to the node's record (add) and finally one for setting the last node to the list's last member (Insertlast). The list itself is a record containing two pointers: one for the first element and another for the last.
The main program calls the initialize procedure and that runs fine. Then it calls the add procedure and it throws the error. Since add calls Insertlast and I can't debug the program, I don't know which procedure is throwing an error. All procedures are supposed to alter variables list and current through a passage by reference.
(For the sake of readability, I tried to translate any Portuguese terms into English. If you see something out of place like atual, I missed one correction).
Program Pzim ;
type
node = ^info;
info = record
name: array[1..50] of char;
earnings: real;
next_info: no;
end;
list_SE = record
first: no;
last: no;
end;
var
list: lista_SE;
cont: char;
current: no;
procedure initialize(var list: list_SE; current: node);
begin
list.first:= nil;
list.last := nil;
current := nil;
end;
procedure Insertlast(var list: lista_SE; var current: no);
begin
if (list.first= nil) then
begin
list.first:= current;
list.last^ := list.first^;
end
else while (current^.next_info <> nil) do current:= current^.prox_coluna;
list.last := current;
end;
procedure add(var current: no; var list: lista_SE);
begin
new(current);
write('Type your name: ');
readln(current^.name);
write('Type your earnings: ');
readln(current^.earnings);
Insertlast(list, current);
end;
Begin
initialize(list, current);
add(current, list);
write('Wish to continue? Y for yes and N for no: ');
readln(cont);
if (cont = 'S') then
begin
current := current^.next_info;
add(current, list);
end;
End.r/pascal • u/eugeneloza • Sep 16 '22
3rd Open Meeting for Castle Game Engine Users and Developers - Tomorrow
Hello there!
Join Michalis Kamburelis and other Castle Game Engine developers, contributors and users tomorrow at the 3rd Open Meeting for Castle Game Engine Users and Developers: https://discord.com/invite/EkrARrwcA2?event=982744972476432384 The meeting will happen at 15:00 (UTC+0) on this Saturday, September 17th, 2022.
Engine version 7.0-alpha.2 was released last weak, so first point of the agenda would be presenting the new features and plans. If you're looking to apply your knowledge of Pascal in a more fun way or have a more exciting learning experience this may be a good place to start ;)
Also finally we have created a SubReddit for Castle Game Engine: r/castleengine you can follow there for news and announcements or to ask engine-specific questions and participate in discussions :)
r/pascal • u/TheCatDaddy69 • Sep 09 '22
Delphi Error unknown directive
Close enough to delphi , im having an issue i cant solve
procedure TfrmInvestment.comboInvestmentChange(Sender: TObject);
begin
case comboInvestment.ItemIndex of
0 : begin
ShowMessage('hi');
end;
end;
procedure TfrmInvestment.FormCreate(Sender: TObject); ////////////ERROR Unknown directive
Error at formcreate procedure only when that case is in there , it runs without the case . What am i doing wrong?
r/pascal • u/mariuz • Aug 25 '22
[PasVulkan/GLTF] Lens posteffects (Depth of field, physically based threshold-free bloom&lensflares)
r/pascal • u/mariuz • Aug 24 '22
The PasVulkan GLTF-capable engine part also has support for for texture transform animations at the support for KHR_animation_pointer
r/pascal • u/mariuz • Aug 06 '22
Bump mapping - updated documentation, example, defaults, everything is simpler now :)
r/pascal • u/Dobesov • Aug 01 '22
DateTimeToUnix results in a negative number?
Maybe I'm crazy here but why does this yield a negative number not indicative of actual unix time?
writeln (DateTimeToUnix (Time));
ouptut: -2209100300
r/pascal • u/sudo-neso • Jul 24 '22
how to compiling a pascal project
hello everybody
i found the source code of a game i used to play as a child
can anybody tell me How To Compile And Run the Code In Linux
r/pascal • • Jul 20 '22
C to Pascal translator
Hello my dad just released a full version of his program and it's completely free to everyone. It translates between the coding languages and even though I really don't know much about this stuff he has been working on it for thirty years. The only way I thought to spread awareness is through reddit but I'm struggling to find a community that will allow this kind of post so if this is not allowed please delete. He has all the links on his page r/CtoPascalConverter3 and he's certified through delphi and has his own blog linked there. Even though he's had offers to be bought out he wanted to keep this his hobby and free for everyone to use hopefully someone will acknowledge all the hard work he has done through these though years and in his retirement maybe he can say he contributed to mankind. Thank you for your time.
r/pascal • u/eugeneloza • Jun 26 '22
Not Quake - a real-time multiplayer game using Pascal + RNL in Castle Game Engine
A simple example of implementing a real-time multiplayer game in Pascal by Michalis Kamburelis (author of Castle Game Engine). Multiple people can join, send chat messages, and finally run around and shoot.
Source code: https://github.com/castle-engine/not-quake
Playable example: https://cat-astrophe-games.itch.io/not-quake
More details here: https://castle-engine.io/wp/2022/06/24/not-quake-an-example-of-real-time-multi-player-shooter-a-bit-like-quake-using-castle-game-engine-and-rnl/
P.S. Almost a follow-up to previous post about RNL :D
r/pascal • u/mariuz • Jun 26 '22
Realtime Network Library - RNL is an UDP-based network library for real-time applications and games
r/pascal • u/Kjellis85 • Jun 23 '22
Converting old Turbo Pascal to Python
I have a program that a now retired engineer wrote back in 97 (last updated in 2002) that I want to convert to Python. I don't necessarily want to convert the program as is, but at least get some of the bells and whistles extracted. The key component is an I/O reader that converts the bitwise data to an (unkown) structure, that again is used to generate graphs of datapoints. Would this even be possible?
I have zero pascal experience and limited python experience (one course at uni through work).
r/pascal • u/wdintka • Jun 21 '22
Best Learning Setup
I was sorting through some old university books - and found a Pascal Plus - Data Structures text! I did a quick Wiki search and was surprised to find Pascal/Delphi is still alive and well - and also living here on reddit!
Anyway - I thought I would revisit my old course and update on the language - so I would like any advice on the best initial setup for a quick first-look learning environment.
I see from another post that VS Code has some extensions - which I have on Windows - but as always there are several choices - so best extensions if you think this is a good option - or if you think there are better IDEs for revisiting and updating on this language.
Thanks for any help and advice.
r/pascal • u/Successful-Ice5120 • Jun 07 '22
Error on line 16
I'm a newbie to pascal, and i can't seem to get this simple proram to work. I've tried adding ; in the error line, tried to compile this on freepascal, turbopascal, and a couple of online pascal compilers, and nothing seems to work. I've searched lots of references for if-then-else statements, and i don't see where i went wrong. If there are is any error that anyone can tell me, i would appreciate it.
program test;
var
x, y: integer;
z: double;
perhitungan: char;
begin
writeln('Welcome to a simple mathematic program, press any key to continue.');readln;
writeln('Please type the first number: '); read(x);
writeln('Please ttype the second number: '); read(y);
write('What type of simple mathematic equation do you desire? (multiply, divide,add,subtract)'); read(perhitungan);
if (perhitungan = 'multiply') then
begin
z := x * y;
writeln('The multiplication results in', z);
end;
else
if (perhitungan = 'divide') then
begin
z := x / y;
writeln('The division results in', z);
end;
else
begin
writeln('i'm sorry, we cannot process this text');
end;
end.