> Your argument makes no sense. There's always been multiple ways to do
> many things in pascal, and it's never caused any more confusion than any
> other typical language construct.
I don't think the comparison to "multiple ways to write a comment" is
proper here. Because various ways to write c
> But pas2js exists, I believe it is important, and that explains my decision.
OK. I will have to accept this decision :) Well I see your arguments
(Pas2js compatibility + you feel Delphi design is "horror" :) ). Even
if I do see a different decision as more optimal.
For the sake of clarity, I do
Michael Van Canneyt wrote:
> Personally, I prefer the backtick solution.
> The triple quote is slow, it requires postprocessing the string.
> The backtick solution needs only one pass.
>
>
> I positively HATE it when people start treating whitespace as
> significant. No YAML or Python for me on th
>
> Anyways, thanks to for getting this merged. It’s been a whopping 6 years
> since the PR was made and it’s a very welcome feature for embedded code. 👏
>
Oh, I also want to add "thank you" by the way for multi-line strings!
We have code constructing long shaders in Castle Game Engine. It right
Michael Van Canneyt wrote:
> > Let's delete custom very special FPC variant with ticks. leave only Delphi
> > variant, please. in English it is maybe called as 'align implementation with
> > Delphi'.
>
> It is aligned with Delphi ?
>
> > why? to keep the same source when changing objfpc/delphi mode
Karoly Balogh wrote:
> We're in the offtopic again, but I really hate this kind of elitism. As a
> kid I started with BASIC - on various Commodore home computers then also
> on early IBM PCs - and I hope to think I grew up to be a semi-decent
> programmer. At least I can fix your Pascal compiler fo
Note:
As a consequence, the GitHub Action
https://github.com/gcarreno/setup-lazarus also fails now. Trying to
use it to install FPC+Lazarus results in an error
Error: getPackageList -- Request timeout: /packagelist.json
in GitHub Action workflow output. I guess because the action downloads
htt
Steve,
If you're looking for equivalent to "return X", use "Exit" with a
parameter in Pascal: "Exit(X)".
It's just a shortcut for "Result := X; Exit;"
Regards,
Michalis
pon., 12 cze 2023 o 19:57 Steve Litt via fpc-pascal
napisał(a):
>
> Nikolay Nikolov via fpc-pascal said on Mon, 12 Jun 2023 0
I'm also curious :)
I just tested, and the -Co (lowercase "o") enables overflow checking
by default (like "{$Q+}" in code),
https://github.com/michaliskambi/modern-pascal-introduction/wiki/What-are-range-and-overflow-checks-(and-errors)-in-Pascal
.
But -CO (uppercase "O") seems unrelated to it.
The chatbot is quite amazing :) I wrote about my nicest moments on
https://castle-engine.io/wp/2022/12/17/my-mind-is-blown-i-can-use-ai-to-generate-castle-game-engine-code-to-integrate-it-with-physx-i-can-use-ai-to-generate-html-documentation-from-comments-in-pascal-code/
-- generate Pascal code to
That's a funny interaction between Variants and Pascal's ambiguous
(logical or bitwise) "and" :) Both the operators and the types are
ambiguous -> making the boolean short-circuit evaluation not possible.
Indeed one workaround is to cast the variants to Booleans explicitly,
which makes it use logi
Great news! Thank you to the FPC team for all magnificent work.
I maintain Docker images with FPC (with various versions and
cross-compilers, with Castle Game Engine and some related tools), see
https://hub.docker.com/r/kambi/castle-engine-cloud-builds-tools/ and
https://github.com/castle-engine/c
Torsten Bonde Christiansen wrote:
> Hi List.
>
> I am curious to know if there is someone out there that have tried to
> use Docker (https://www.docker.com) containers to build fpc applications?
>
> I have 3 applications in a suite that I am thinking of experimenting
> with, see if I can create a
Ryan Joseph wrote:
>
> > Or you could use Generics.Collections unit with generic TList for
> > records. It by default compares records by comparing memory contents.
>
> Is that part of the RTL and if so what’s the unit name? I had a hard time
> finding good resources on classes the RTL provides.
2018-07-01 4:01 GMT+02:00 Vojtěch Čihák :
> this seems to be misleading error message. TFPGObjectList works well for
> objects (classes). When I tried to push record to it, I got the same error
> message. TVec3 is not class, right?
Indeed, it's a misleading message. The message
...identifier
2018-05-10 4:08 GMT+02:00 Marco van de Voort :
> In our previous episode, Michalis Kamburelis said:
>>
>> 1. XBox One. It uses an operating system based on Windows 10. As such,
>> maybe compiling FPC programs for it is already possible (or is easy to
>> add)? Maybe I
2018-05-10 4:05 GMT+02:00 Dmitry Boyarintsev :
> On Wed, May 9, 2018 at 9:38 PM, Michalis Kamburelis
> wrote:
>>
>> This would mean that it is impossible to openly distribute an open-source
>> code interfacing with e.g. PlayStation custom OS. Precluding open-source
>
The more I was reading about console development, the more I understood
that the main problem are NDAs that seem to still "guard" the information
about each consoles closed APIs.
This would mean that it is impossible to openly distribute an open-source
code interfacing with e.g. PlayStation custom
Hi,
I am wondering about the possibility to port Castle Game Engine to
modern gaming consoles.
Summary (TL;DR):
- Is it possible to use FPC to compile programs/libraries for one of
the gaming consoles mentioned in the subject?
- If it is not possible *yet*, how easy it would be to add such
supp
Ryan Joseph wrote:
>
>
> > On May 1, 2018, at 9:56 PM, Michael Van Canneyt
> wrote:
> >
> > You must do
> > gl := TJSWebGLRenderingContext(canvas.getContext('webgl'));
> >
> > because getContext can return various classes depending on the argument.
>
> Ok so getContext is method of TJSElement I
2018-05-01 4:50 GMT+02:00 Ryan Joseph :
>
>
>> On Apr 25, 2018, at 9:43 PM, Michael Van Canneyt
>> wrote:
>>
>> Ah, webgl...
>>
>> I had a look at this some time ago, and got depressed. Quickly closed the
>> browser and didn't look back. Same for webaudio :(
The API of WebGL is actually mostly
Michael Van Canneyt wrote:
>
>
> On Mon, 23 Apr 2018, Michael Fuchs wrote:
>
> > Am 23.04.2018 um 12:43 schrieb Mattias Gaertner:
> >>> I found TPasTreeContainer.NeedComments but it does nothing.
> >>
> >> Set that to true. Then create the parser.
> >
> > Ok, so I can not use the function ParseSo
2017-10-08 9:03 GMT+02:00 Sven Barth via fpc-pascal
:
> Am 08.10.2017 06:39 schrieb "Mr Bee via fpc-pascal"
> :
>>
>> Hi,
>>
>> Is there any FPC command line option for writable constanst directive {$J}
>> or {$WRITEABLECONST} ?
>
> No, there is not.
>
There is my old feature request about it
http
2017-10-06 23:55 GMT+02:00 Maciej Izak :
> ... and here is library with exclusive usage of "management operators" for
> FPC:
>
> https://github.com/pda0/AutoScope
>
> ... and here is experimental smart pointers/objects/nullable types
> implementation:
>
> https://github.com/maciej-izak/PascalSmartP
2017-10-06 21:49 GMT+02:00 Michalis Kamburelis :
> 2017-10-06 20:52 GMT+02:00 Marcos Douglas B. Santos :
> [...]
>>> In this case, in which you indeed want two of these features simultaneously,
>>> I advise COM interfaces myself :) That's why they are documented after
2017-10-06 20:52 GMT+02:00 Marcos Douglas B. Santos :
[...]
>> In this case, in which you indeed want two of these features simultaneously,
>> I advise COM interfaces myself :) That's why they are documented after all.
>
> I can use it only to use reference counting.
You can, but it's a little unc
05.10.2017 2:07 PM "Marcos Douglas B. Santos" napisał(a):
On Thu, Oct 5, 2017 at 5:55 AM, Ryan Joseph
wrote:
>
>> On Oct 5, 2017, at 12:28 PM, Sven Barth via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:
>>
>> The way to go in Object Pascal are reference counted interfaces (aka
COM-style
Hi,
We're proud to release Castle Game Engine 6.0, an open-source 3D and
2D game engine for Object Pascal.
This release is a culmination of more than a year of intensive engine
development. The main feature is that almost every part of the engine
got significant improvement, and we have more "new
2016-10-05 9:00 GMT+02:00 Maciej Izak :
>
> 2016-10-05 4:32 GMT+02:00 Michalis Kamburelis :
>>
>> For example, the call
>>
>> Format('%s', [123])
>
>
> I have a small hint (instead of answer). We have in mORMot / NewPascal in
> SynCommons modul
Hi,
I'm wondering if there is a tool that checks the correctness of calls
to Format and friends (like Exception.CreateFmt) in your code. Or does
someone plan to write one, as an external tool (like a "lint") or
inside the FPC compiler:)
For example, the call
Format('%s', [123])
is guaranteed
2016-09-30 18:19 GMT+02:00 stdreamer :
> On 30/09/2016 17:24 μμ, Michalis Kamburelis wrote:
>>
>> 4. And how about going even more further, and just generate an
>> internal GUIDs (random, or based on a memory address) when no GUID is
>> explicitly specified? This way &q
This thread, and my own tests, showed that you need to assign GUIDs to
interfaces to have reliable "is", even for CORBA interfaces.
I'm wondering, would it be possible to improve here things on the
compiler side (at least only in FPC-specific modes or under some
modeswitch), to make things safer?
2016-09-07 18:41 GMT+02:00 Ryan Joseph :
>
> I did enough research in Android for FPC to know I could do a simple OpenGL
> game using the JNI but it didn’t look very complete and I never could get the
> compiler built on my Mac. Is there enough of the Android NDK (I think it’s
> called) ported t
2016-09-04 18:08 GMT+02:00 Marcos Douglas :
> I have streams compressed using GZip. I get these streams from WebServices.
> So, how can I decompress these streams only in memory?
It seems you already have a solution, but here's another one:)
In Castle Game Engine, I have a unit CastleZStream tha
2016-06-28 15:05 GMT+02:00 John Youngquist :
> Is there a non Lazarus means of accessing the mouse, and scroll wheel?
> I have an app that uses some old driver which doesn't address the wheel.
> I'm trying to make the wheel work. I have tried SDL and the demo code works
> but it seems to work only
> After upgrading fpc 2.6.4 -> 3.0.0, I'm seeing a bug where (as noted in
> subject) reference-counted function results are not being initialized to
> nil.
They were never guaranteed to be initialized to nil.
Reference-counted types (unlike other types) cannot contain memory
garbage. But it doesn
2016-06-21 15:57 GMT+02:00 Dennis :
> Following up to the cloning example code:
>
> Type
> TMyClassRef = class of TMyClass;
>
> implementation
>
> function TMyClass.Clone(AOwner: TComponent): TMyClass;
> begin
> Result := TMyClassRef(ClassType).Create(AOwner);
>
> //but the next line will fail
2016-06-21 15:03 GMT+02:00 Sven Barth :
> Am 21.06.2016 12:31 schrieb "Michalis Kamburelis"
> :
>> Current FPC defaults:
>>
>> - Help people who except the {$mode fpc} to be default (so they write
>> code without classes and a lot of other new features),
>
2016-06-21 12:14 GMT+02:00 Marco van de Voort :
> In our previous episode, Michalis Kamburelis said:
>>
>> - A section about TPersistent.Assign. This is the "basic approach to
>> cloning" that should probably be shown first. See it here:
>> htt
>> I even expect a bit further. These {$MODE OBJFPC}, {$H+}, and {$J-}
>> directives should be the *default* directives for every new FPC
>> programs/units. We're now using Free Pascal compiler on 2016. Why do we need
>> to explicitly declare Free Pascal mode in a Free Pascal program? In 21st
>> ce
> |I remember someone once asked whether we should override the method Assign
> or AssignTo.|
> |I am worried, choosing the wrong method to override will produce unexpected
> result.|
The AssignTo is only used by TPersistent.Assign, so it's a "fallback"
--- if class A cannot copy *from* B, then As
2016-06-21 8:15 GMT+02:00 Marc Hanisch :
> Thanks Michalis for your excellent work! It's very important to left the
> early 90s associated with Pascal programming behind us and to encourage new
> developers to have a look onto the modern aspects of Object Pascal!
>
> Maybe a little bit offtopic, bu
2016-06-20 14:30 GMT+02:00 Marcos Douglas :
> Don't agree with "Ugly (COM) interfaces". Yeah, _AddRef, _Release,
> QueryInterface is ugly implementation but reference-counting mechanism
> is nice.
>
Reference-counting is a useful concept, but "entangling" it with
interfaces is somewhat ugly IMHO.
2016-06-20 11:44 GMT+02:00 Mark Morgan Lloyd
:
[...]
> I'd suggest warning readers early about "dangling else", and using otherwise
> rather than else in the case examples.
As for dangling else - good idea, I added a text and example
mentioning it briefly at the of
http://michalis.ii.uni.wroc.
2016-06-20 6:16 GMT+02:00 Dennis Poon :
> May I suggest the addition of :
> 1) user defined operator?
Added. I had it on my TODO list already:) See it here:
http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.html#_operator_overloading
.
I documented als
2016-06-20 5:31 GMT+02:00 Mr Bee :
[...]
> I have a little suggestion though. I prefer to use {$J-} directive in my
> Pascal program. I think it encourages good programming practice in Pascal.
> The {$J-} means constant is a constant no matter how you declare it. To bad
> FPC is still using {$J+} a
Hi,
So, I wrote a document describing (quickly!) many features of the
modern Object Pascal:)
Read on:
http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introduction.html
http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/modern_pascal_introductio
2016-03-17 15:17 GMT+01:00 Paul Breneman :
> I would suggest checking this out:
> http://castle-engine.sourceforge.net/engine.php
> https://github.com/castle-engine/castle-engine/wiki/Build-Too
>
Small correction, the link should be:
https://github.com/castle-engine/castle-engine/wiki/Build-Too
> /Developer/Android/android-ndk-r10e/toolchains/arm-linux-
androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ld.bfd:
cannot find -lc
pp.pas(219,36) Error: Error while linking
>
>
Have you defined the -Fl option correctly?
For example, I put something like this in m
>
>
> This will probably make more sense when I learn about the asset manager
more. I think I read there is a format like asset:// for file URL’s.
Remember that the "asset:/..." URL is just implemented in Castle Game Engine
(see http://castle-engine.sourceforge.net/tutorial_network.php ).
> I see you made a builder tool I’ll have to check out. From the Android
tutorials I’ve seen building Android packages seems be pretty forward. You can
run/install apps from the terminal also I think based on your documents.
That’d be nice to not be in Android Studio if I don’t have to be.
Yes,
2016-02-21 23:00 GMT+01:00 Sven Barth :
> Am 21.02.2016 19:36 schrieb "Michalis Kamburelis"
> :
>> >
>> > 1) All the file I/O in the FPC RTL is not available so what possible
>> > work arounds are there for loading data from files?
>>
>> Ac
2016-02-21 4:36 GMT+01:00 Ryan Joseph :
> I’m going to attempt to port a game to Android but I have some questions
> about potential problems. Now at least I think building a library and loading
> using the JNI would be best but using the JVM could be helpful also (the
> entire project couldn’t
>> Right now we only have "with notifications, and not type-safe"
>> containers (TObjectList/TList) and "without notifications, and
>> type-safe using generics" containers (TFPObjectList/TFPList).
>
>
> These latter 2 are not generics based. There was some experimental code
> which attempted to im
2016-02-18 15:43 GMT+01:00 Mazola Winstrol :
> Em 18/02/2016 10:12, "Marco van de Voort" escreveu:
>>
>> In our previous episode, Mazola Winstrol said:
>> >end;
>> >
>> >
>> > Suppose that this class represent data of the Person table in a sql
>> > database. Suppose that there is records where
>> Can you send little bit sample showing this degradation? I can inform him
>> to not send the patch because this problem. (I think that him isn't
>> registered here in the list yet)
>
> There's no need for a sample. This degradation is the whole reason why the
> non-generic classes TFPObjectList
Maciej Izak wrote:
> +1 . IfThen instricit is IMO very bad idea. I have a lot of "IfThen"
> from math and strutils modules.
>
> IfThen from System totally breaks the compatibility :\ . C'mon Sven. In
> one field you're rigorously but in something like this you're liberal
> (braking/dangerous chang
Ryan Joseph wrote:
> Is it available in any version before 2.0 do you know? I don’t know
> much about OpenGL but there is a 1.5 version also which maybe has
> it.
>
Before OpenGLES version 2.0 (shader pipeline), you only have OpenGLES
1.1 and OpenGLES 1.0. See https://en.wikipedia.org/wiki/OpenGL
Ryan Joseph wrote:
> I’m using OpenGLES 1.1 because it was easier to learn but I don’t see
> glBlendEquation being included in the GLES11 unit. Maybe it didn’t
> exist until OpenGLES 2.0?
>
Indeed, glBlendEquation is simply not available in OpenGLES 1.1.
See the specs: https://www.khronos.org/op
Ryan Joseph wrote:
> Just tested on iOS and I get that error. I think on iOS it loads from the
> OpenGLES.framework and therefor this is failing. Also that load function
> wasn’t available but it failed upon including the GLExt unit.
>
> An unhandled exception occurred at $0001000CDEF7:
> Ex
Ryan Joseph wrote:
> Functions like glBlendEquation from GLExt are crashing (access violation)
> compiling on Mac with ppc386. The functions didn’t get loaded I think for
> some reason.
>
> Is this is known problem on Mac with a work around perhaps?
>
GLExt works fine on Mac (and other platfor
Ryan Joseph wrote:
> I’m trying to learn some basics of Windows and porting some OpenGL
> code. The first step is getting an OpenGL context prepared but I’m
> already stuck here.
>
I would recommend our Castle Game Engine
http://castle-engine.sourceforge.net/ . It can be used together with
Lazaru
Mark Morgan Lloyd wrote:
Michalis Kamburelis wrote:
The main engine site,
with detailed list of features, links to downloads and documentation,
is on
http://castle-engine.sourceforge.net/engine.php
I wonder whether I could ask one very basic question. Is this intended
for creating e.g VRML
Reimar Grabowski wrote:
On Sat, 03 May 2014 21:35:17 +0200 Michalis Kamburelis
wrote:
The main engine site, with detailed list of features, links to
downloads and documentation, is on
http://castle-engine.sourceforge.net/engine.php
First I have looked everywhere but not found how physics
Hi everyone,
We're proud to announce the release of Castle Game Engine 5.0.0 :)
Castle Game Engine is an open-source (LGPL) 3D and 2D game engine, of
course for modern Object Pascal (FreePascal / Lazarus). We support many
3D formats and various graphic effects. The main engine site, with
deta
Mattias Gaertner wrote:
Hi all,
ExtractFilePath and ExtractFileDir stops at last '/','\', so it treats the
normal character \ as path delimiter under Unix.
Is there a RTL function that handles the \ as normal character?
You can change global AllowDirectorySeparators
(http://www.freepascal.o
Michael Van Canneyt wrote:
If an implementation of Read does not return the requested data when in
fact it is available, then the implementation of Read is broken.
I guess it depends how do you interpret TStream.Read documentation...
http://www.freepascal.org/docs-html/rtl/classes/tstream.read
Michael Van Canneyt wrote:
The above implementation should not be changed, it is Delphi compatible:
TStream.ReadBuffer works on the assumption that Read will always return
the amount of bytes requested if they are available.
So, if you want to make changes, there is no reason why TStream.Read
sh
Ewald wrote:
The question that arises here is whether all the `ReadByte`,
`ReadWord`, `WriteByte`, `WriteWord`, `WriteBuffer`, ... should also
`try harder`? Same issue there: no data is returned about the actual
number of bytes read. Anyway, I leave that to someone who knows the
internals of thes
Ewald wrote:
And what with non-blocking pipes pipes? Wait for a *some* period
until you get all data? It is up to the programmer to do this INHO.
If you want to get partial data (instead of waiting until all requested
data is available) you should just use TStream.Read instead of
TStream.Read
Hi,
I'm often reading fixed-size structures using TStream.ReadBuffer,
working under the assumption that it will fail only if it's not possible
to read the requested amount of bytes (that is, if the stream ended
prematurely). This is actually the documented usage, see
http://www.freepascal.org
Flávio Etrusco wrote:
"Members" refer to each available section according to the flags.
Re-read this whole paragraph you posted and a few following you'll
realize only one "file" is allowed in a gzip file/blob.
I think this confusion comes from the fact that
http://www.gnu.org/software/gzip/m
Justin Smyth wrote:
I have converted the one from fpc to its own library to do streams , can
email it to you later if you wish
Yes, that would be appreciated. As long as everything you send me is
covered by the same license as FPC RTL (LGPL with static linking
exception), so that I can use it
José Mejuto wrote:
El 27/03/2013 19:22, Michalis Kamburelis escribió:
Google found an old thread on lazarus mailing list about this ("FPC,
gzip and stream") but without any solution, everything mentioned there
has either the limitations of TCompressionStream/TDecompressionStrea
Hi,
Like the subject says, I'm looking for a TStream implementation that
takes another TStream and compresses/decompresses data in gzip format. I
would like to read/write gzip data to a stream, any TStream (maybe
TFileStream, maybe TMemoryStream, maybe a stream from the network like
TSocketSt
Michal Wallace wrote:
The database of contributed pascal code seems to have disappeared:
http://www.freepascal.org/contrib/db.php3
Anyone know where it went, or how to get it back? :)
It's on http://www.freepascal.org/contrib/contribs.html now. But some
pages may still contain old links, se
Victor Matuzenko wrote:
Hi,
I have tried to compile it under Windows XP with «make all», and got the
errors:
[...]
Compiling src\opengl\windows\castleglwindowsfonts.pas
castleglwindowsfonts.pas(81,22) Error: Incompatible types: got
"LongWord" expected "TWinCharSet"
A bug slipped into the re
Hi,
I would like to announce a release of Castle Game Engine 4.0.0, an
open-source cross-platform 3D game engine for Object Pascal (only
FPC/Lazarus):
http://castle-engine.sourceforge.net/news.php?id=release-4.0.0
I'm letting myself post an announcement to lazarus and fpc-pascal
mailing l
michael.vancann...@wisa.be wrote:
On Sun, 16 Dec 2012, Graeme Geldenhuys wrote:
On 15/12/2012 21:22, Sven Barth wrote:
Maybe because the authors prefered inline comments instead of fpdoc's
XML files...
A shame, because the more detailed the documentation, the more it
obfuscates the code.
e
luciano de souza wrote:
Yes, there is a very nice tool. Its name is Pasdoc. Take a look here:
http://sourceforge.net/projects/pasdoc/
For this project, the author has changed the source code of Pasdoc.
Originally, it's compatible only with HTML 4, but the documentation
was released in HTML 5.
Bernd wrote:
(Almost) The only other small discontinuity was the PNG writer from
fcl-image needs to be explicitly told Indexed:=False on 64 bit while
on 32 bit this was not necessary.
Indexed is false by default in FPC >= 2.6.1, see "BTW" and notes in
http://bugs.freepascal.org/view.php?id=21
silvioprog wrote:
Nice project. :)
castle_game_engine-3.0.0-src.zip = +-70MB.
Most of the size comes from the examples, they contain also example 3D
data files (models, animations etc.). I prefer to give people full
package :) For those who want to get parts, they can always check out
appr
luciano de souza wrote:
I took a look in Openal examples. I need to confess that I expected
something easier. Perhaps, something like:
PlaySound('file.wav', 0)
You need to wrap OpenAL a little to get something so simple.
In my Castle Game Engine (http://castle-engine.sourceforge.net/), I hav
Hi,
I'm not sure if anyone is actively watching the Mantis issues for
FpProfiler, so I thought I'll mention it here: I submitted a patch to
fix the compilation with fpmake from command-line. It's on
http://bugs.freepascal.org/view.php?id=21991
Regards,
Michalis
Ludo Brands wrote:
- Maybe there's a workaround? IOW, can someone successfully
use massif
with FPC programs?
This is known problem not related to fpc. Run
valgrind --tool=massif --run-libc-freeres=no ./trivial_alloc
Fantastic, many thanks, it works like a charm now! :) Both on trivial
te
Sven Barth wrote:
You could try whether heaptrc is of any help for you (see here:
http://www.freepascal.org/docs-html/rtl/heaptrc/usage.html ). If not it
might at least provide a starting point if you should decide to write a
custom memory profiler. Otherwise I don't know of any FPC based memory
Hi,
I wanted to debug where my program uses the most memory. (There are no
memory leaks, but I want to optimize memory usage on some large inputs.
As the code is quite large, simply guessing which part is responsible
becomes quite hard :) In the past, I happily used valgrind's massif tool
for
dhkblas...@zeelandnet.nl wrote:
When you have overloaded functions, fpdoc will group them on one page.
The arguments however are listed in two separate arguments sections. It
would be nice to have the arguments merged in one section. I do not know
how to display the arguments though (no idea what
Hi,
For people working with new OpenGL features: I just submitted a patch
to upgrade our GLX unit to GLX 1.4, add some new GLX extensions, and
add comfortable functions to check existence of a particular GLX
extension/version. This allows you to easily use modern GLX "FB
config" functions to initi
Paul Ishenin wrote:
> 06.01.2011 20:14, Michalis Kamburelis wrote:
>> return true. After all, TB is forced to implement methods of both IA and
>> IB, as IB descends from IA. But to my surprise, Supports(TB, IA) returns
>> false.
> This is expected behavior. It works t
Hi,
Consider the attached source code. I have a base interface (IA) and a
descendant interface (IB). Class TB is declared as
TB = class(TInterfacedObject, IB) end;
Now I would expect that both
Supports(TB, IA)
Supports(TB, IB)
return true. After all, TB is forced to implement methods of
Just sharing, in case someone will find the below information useful,
or worthy to add to some wiki or docs anywhere:
I have here a daemon written in FPC that communicates with clients by
very nice TSimpleIPCServer class (in SimpleIPC unit). Of course it's
trivial to send a message to such server
Darius Blaszyk wrote:
> Has anyone ever converted the SDL_opengl header to FPC? Couldn't find it
> in the repository, but perhaps someone knows if it is part of another
> project.
>
SDL_opengl.h is just (one of the) cross-platform ways to include OpenGL
stuff in C programs. We don't need it in FP
Marco van de Voort wrote:
>> If your distro complies with the LSB standards (most popular distros
>> do), then you should have a /etc/lsb-release text file that you can
>> parse.
>
> FC11, no such file, but there is a dir lsb-release.d with the contents
>
You're not really supposed to be looking
Graeme Geldenhuys wrote:
I can't find an example for loading a .wav file.
[...]
Any hints or sample code. The sample included in FCL 2.4.1 loads MAD, A52,
OGG and ModPlug only. Google revealed a tutorial using AlutLoadWavFile(),
but that is in the "unofficial utilities library", it's not part
All the talk about the Pascal parser in fcl-passrc got me interested
recently. I did some experiments, and I thought I mention here:
1. I added a simplest example how to use fcl-passrc to the wiki:
http://wiki.freepascal.org/fcl-passrc
2. And reported a couple of bugs found in fpdoc (tested on P
Graeme Geldenhuys wrote:
> On 21 February 2010 17:00, Michalis Kamburelis
> wrote:
>> Which also means "less chance of mistake". For example, if you decide
>> later to change "y" to "y1", you only have to change the code in one
>> place, n
ik wrote:
> On Sat, Feb 20, 2010 at 20:01, Jürgen Hestermann
> mailto:juergen.hesterm...@gmx.de>> wrote:
>
>
>
> y := case Other of
> bla : 'hello';
> foo : 'bye';
> baz : 'adius';
> end;
>
>
> What do you gain with this
cobines wrote:
> everything is ok. But I can also assign it using class name:
>
> CM.Callback := TContextMenu.ContextMenuSelect;
>
This is the way it's supposed to work in delphi mode, as far as I
remember Delphi allows it (disclaimer: I don't have Delphi now to check,
but it used to be so aro
Hans-Peter Suter wrote:
>
> PS: thanks also to the other suggestions! And if somebody uses Emacs I
> am still interested to hear about how it goes. Thanks again!
I use Emacs most of the time to edit my Pascal (and all other :) ) code.
But it has it's learning curve. And, although there are variou
1 - 100 of 180 matches
Mail list logo