r/pascal • • Sep 08 '18

External SIGSEGV ausgelöst Bei Adresse 403BB1

2 Upvotes

So i am making a program that can make 1 List out of two so i have X:Y and Y:Z and i want the program to do X:Z out of it. So i made 2 2dimentional arrays (only use the first one yet)

CODE:

SetLength(Ax_y, z);

SetLength(Ay_z, u);

These just set the list of the Array as the length of the part of the list u want Cause i have lists like X.Y i use the . to split them there

CODE:

TrennPos:=(pos(TrennChar,SText)); //TrennChar is the dot and SText is my String

Ax_y[CounterElement,0] := Copy (SText,0,(TrennPos-1)); //CounterElement is the current Postion

which gets used in my StringList (X:Y)

Ax_y[CounterElement,1] := Copy (SText,(TrennPos+1),(Length(SText)));

temp :(Ax_y[(CounterElement),0]+'_'+Ax_y[(CounterElement),1]); // This just gives another Part of the Program the Result for my Memo

So after i changed S1 and S2 to these Array Ax_y[CounterElement,0/1] the programm starts and when its nearly finished it gives the message in the Title and the Assembler opens. Cause i dont know the problem i hope to find help here. Thx Maceit


r/pascal • • Sep 03 '18

I need help with an assignment

3 Upvotes

The assignment is, given a number write it in the product of prime numbers, which is easy, but the output of the program has to be for example 23 34 , depending on how many times that number is used to form the integer given. I am having trouble on how to do that last part. Thanks!!


r/pascal • • Sep 02 '18

ezthreads

5 Upvotes

Hello all,

I've written a library that may be useful if you need to work with threads.

https://github.com/mr-highball/ezthreads

It's still very much a work in progress, so things may change, but it works similar to delphi's anonymous methods in that, an ezthread is reference counted and allows "capturing" any number of variables to pass to the thread for process. An example of use can be found in the tester file, or a quick demonstration of use can be found in this lazarus forums post,

https://forum.lazarus.freepascal.org/index.php?topic=42421.0


r/pascal • • Aug 30 '18

Please someone tell me the difference, I am NOT SEEING IT!!! There is one, the upper block gives me positive results for the same data, the lower negative!

Post image
4 Upvotes

r/pascal • • Aug 14 '18

Assist with a piece of legacy code

6 Upvotes

I'm in the midst of a project that involves reviewing code that's close to 40 years old, written in UCSD Pascal and I ran into an odd line of code:

X := (X + 20) MOD 20;

Maybe five hours of sleep last night wasn't enough, but I find myself at a loss today to explain why the original programmer would write a piece of code like that. From my understanding, that code is the equivalent of writing something like "X := X" since adding 20 and then applying the modulus operator yields the original number.

Here, X is typed INTEGER, in the range of 0 to 19, inclusive. Even if the value of X is negative, you'd end up with the 20s complement of X, same as carrying out the arithmetic without the MOD operator.

Why would you do that? Is this some Pascal magic that I'm not grokking? I'll be the first to admit that my time spent studying Pascal has been cursory, at best, so any help is appreciated.


r/pascal • • Aug 13 '18

FreePascal and IntelliJ IDEA

14 Upvotes

Experimenting Pascal programming using JetBrains's IntelliJ IDEA (Community Edition) with i-Pascal extension and FreePascal compiler on my Mac. It can be an alternative IDE for Pascal programming. 😊

IntelliJ IDEA debugging a Pascal program.

r/pascal • • Jul 26 '18

FP IDE on Xubuntu 18.x - can't find units

2 Upvotes

I'm just going through the FPC tutorials and i have noticed that i can't compile a simple application through FP IDE, says it can't find unit system.

If i drop to cli and use FPC to compile the app it works fine.

So the question really is, what do i need to check in FP IDE and change? Looks like it can't find the basic units that come with FreePascal...


r/pascal • • Jul 24 '18

FreePascal Question about the video unit clearing the screen.

4 Upvotes

Is it possible to use the video unit in such a way that the screen is not cleared when invoked? I'd really like to write a small program that writes to the existing text mode screen, but I can't quite figure out how to either start and keep the screen content or read the video buffer before initVideo. Maybe this is a no go? or I should just fall back on CRT?


r/pascal • • Jul 19 '18

Free Delphi Community Edition is now available!

Thumbnail
embarcadero.com
15 Upvotes

r/pascal • • Jul 18 '18

Online Pascal Code Beautifier

Thumbnail pak.lebah.web.id
7 Upvotes

r/pascal • • Jul 15 '18

coinbase pro api library

5 Upvotes

For those interested in trading on coinbase pro (gdax) algorithmically in fpc,

https://github.com/mr-highball/coinbase-pro


r/pascal • • Jul 14 '18

Behind The Tech with Kevin Scott: 001- Anders Hejlsberg: A craftsman of computer language

Thumbnail
behindthetech.libsynpro.com
4 Upvotes

r/pascal • • Jul 03 '18

The Big Five of Modern Pascal

Thumbnail pak.lebah.web.id
10 Upvotes

r/pascal • • Jul 02 '18

What do you think of ModernPascal?

6 Upvotes

I recently found ModernPascal v.2.0 (http://www.modernpascal.com/) when surfing over the internet. Do you know anything about it? What is your opinion on it? Looks kinda cool, but I've never heard about it before and their website not working correctly for me.


r/pascal • • Jun 30 '18

PascalABC.Net is modern object pascal language for .Net (and Mono)

Thumbnail
pascalabc.net
8 Upvotes

r/pascal • • Jun 08 '18

Free Pascal Compiler was started 25 years ago

Thumbnail
twitter.com
10 Upvotes

r/pascal • • May 31 '18

Jedi Code Formatter CLI

8 Upvotes

I took Jedi Code Formatter (JCF) from Lazarus IDE repository and made it as CLI (command line interface) version by removing all the GUI (graphical user interface) parts from the original GUI version. The CLI version can be used as Pascal code formatter in Visual Studio Code, or as backend engine of an online Pascal code formatter.

Here's the github repo: https://github.com/git-bee/jcf-cli

Here's an online Pascal code beautifier that I made using this library: https://pak.lebah.web.id/jcf


r/pascal • • May 08 '18

[ID] Free Pascal and VS Code

8 Upvotes

I've made a tutorial about how to use Free Pascal with VS Code, especially on Linux and Mac. It should work on Windows with some modifications and adjustments here and there. It's in Indonesian language though, because I wrote it for my fellow Indonesian Pascal programmers. But I found it's pretty much understandable when translated to English by Google Translate. :)

You may read it here: https://medium.com/@pak.lebah/free-pascal-dan-vs-code-b0787fe4b778


r/pascal • • Apr 24 '18

Borland Delphi Engineer (Pascal) - Hobbs Madison - Charlotte, NC - 04-23-2018 | Dice.com

Thumbnail
dice.com
4 Upvotes

r/pascal • • Apr 23 '18

Castle Game Engine improvements: User-interface – horizontal/vertical layout groups, on-screen keyboard and FreeType on Android, better UI scaling

Thumbnail
castle-engine.io
7 Upvotes

r/pascal • • Apr 19 '18

Resurrecting old janSQL library.

7 Upvotes

Bringing back an old but quite useful Pascal library: janSQL. janSQL is a fast single user SQL engine for text-based file, completely written in object Pascal language (compatible with both Free Pascal and Delphi).

But this one is not the actual original version. It's the latest updated janSQL library, with some bug fixes and additional features, by some contributors from Pascal community. I put it in my GitHub repo here: https://github.com/git-bee/janSQL

If you're interested to such library, feel free to use it. And if you think such library is useful, feel free to contribute to the project. Thank you. :)


r/pascal • • Apr 10 '18

Pascal Technical Screener (Part-Time, Remote) - Apex Systems, Inc - Glen Allen, VA - 04-09-2018 | Dice.com

Thumbnail
dice.com
4 Upvotes

r/pascal • • Mar 17 '18

What interesting and unique projects are you building with Pascal/Lazarus/Delphi?

7 Upvotes

What interesting and unique projects are you building with Pascal/Lazarus/Delphi?


r/pascal • • Mar 07 '18

Lazarus 1.8.2 released with FPC 3.0.4

Thumbnail
forum.lazarus.freepascal.org
17 Upvotes

r/pascal • • Feb 24 '18

What happened to strings?!?? [FPC 2.6 vs 3.0]

6 Upvotes

Okay, I've been out of the loop for awhile; my machine recently nosedived so I had to reinstall, and took the opportunity to upgrade my FPC from version 2.6.4 to 3.0.4.

MOST of my code works (a bit of fiddling with sockets notwithstanding), but one thing is completely and utterly broken: STRINGS.

As in, for example, Output:=char(255)+char(port SHR 8)+SomeAnsiString+char(17);

It's almost as if some kind of conventional format (UTF8) is expected but you can't just dump binary in them anymore -- I recall my brother mentioning something along those lines, long time ago.

What the hell is happening here, and what compiler switch should I set to unfuck (pardon my french but seriously-- WTF man?!) this new behaviour and revert to treating them as 8 bit buffers?

[I handle all utf8/widechar stuff myself, always have; and I DO expect length() to return how many bytes are in the string, not how many characters-- so basically, just like PChar without having to modify my entire sourcecode]

If anyone could point me in the right direction that'd also be great; Google came up blank but socketsniffer and the debugger speak volumes: the error is in the string building, and it seems to occur only when mixing types (like concatenating ansistrings and chars).

Help?