Re: [fpc-pascal] TStringStream.DataString returns garbage?

2012-02-02 Thread Giuliano Colla
Lars ha scritto: It's actually a common mistake. Also @s vs s, and @s[1], it can be confusing. It's one thing I don't like about unsafe languages, pointers, and such stuff. It's as if we are programming in advanced C, or C++. Common, pointer mistakes? this is C? Really? Can't we make it safer?

Re: [fpc-pascal] Converting big-endian signed 16bits values to fpc integer

2012-04-15 Thread Giuliano Colla
Il 16/04/2012 00:42, Jonas Maebe ha scritto: On 16 Apr 2012, at 00:38, Giuliano Colla wrote: I'm dealing with a large number of data coming from an external device. They are big-endian 16 bits signed numbers, which must be converted to integer and to real to perform calculations. Besides

Re: [fpc-pascal] Converting big-endian signed 16bits values to fpc integer

2012-04-16 Thread Giuliano Colla
Il 16/04/2012 01:44, Andrew Haines ha scritto: There exists the BEtoN and LEtoN functions you can use. (NtoLE and NtoBE also) Thanks to everybody. Now I believe to have enough information to proceed. I'll keep this little piece of discussion as an example to show when someone asks me why I

Re: [fpc-pascal] Creating video files

2012-06-20 Thread Giuliano Colla
Il 20/06/2012 19:22, Krzysztof ha scritto: Ffmpeg looks similar like Mencoder project. So I have some solutions for output encoding, but there is a problem how to send frames to this encoders. Mencoder can encode video from series of PNG files, but can't find similar option in ffmpeg. | ||

Re: [fpc-pascal] Re: Identifier not found result

2012-09-02 Thread Giuliano Colla
Il 31/08/2012 13:48, leledumbo ha scritto: I question your assumption that Result is specifically more important than the other incompatibilities among different modes (i.e. your statement that it will help...a lot). I do not say that it is wrong to be more helpful in error messages, but rather

Re: [fpc-pascal] Re: Identifier not found result

2012-09-03 Thread Giuliano Colla
Il 02/09/2012 18:26, Sven Barth ha scritto: On 02.09.2012 12:39, Giuliano Colla wrote: Il 31/08/2012 13:48, leledumbo ha scritto: I question your assumption that Result is specifically more important than the other incompatibilities among different modes (i.e. your statement

Re: [fpc-pascal] Function for checking correct file name

2012-09-16 Thread Giuliano Colla
Il 15/09/2012 23:48, Jorge Aldo G. de F. Junior ha scritto: This is a security risk, because, if the function isnt almost perfect, someone could end up reading the passwords file (security.sam on windows ? whatever im not a windows programmer) or rewriting criticial files on a system. IOW you

Re: [fpc-pascal] Editing XMP data in images

2012-10-01 Thread Giuliano Colla
Il 01/10/2012 20:00, Mattias Gaertner ha scritto: I need to edit XMP data in images (at least tif, jpg). This can help? http://en.wikipedia.org/wiki/Extensible_Metadata_Platform#XMP_support_and_acceptance Giuliano ___ fpc-pascal maillist -

[fpc-pascal] Why opening a file for write fails in fpc 2.6?

2012-10-31 Thread Giuliano Colla
failed, without rising an exception. Is there a good reason for this change from 2.4 to 2.6 or it's just a bug? -- Giuliano Colla Before activating the tongue, make sure that the brain is connected (anonymous) ___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] Why opening a file for write fails in fpc 2.6?

2012-10-31 Thread Giuliano Colla
in Delphi when locking fails? I have no idea, but if it doesn't it's a Delphi bug, I'd say. What are exceptions there for, if not for telling you that what you requested cannot be done? -- Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde

Re: [fpc-pascal] Why opening a file for write fails in fpc 2.6?

2012-10-31 Thread Giuliano Colla
Il 31/10/2012 14:45, Jonas Maebe ha scritto: On 31 Oct 2012, at 14:35, Giuliano Colla wrote: Understood, thank you. But shouldn't it be the other way around, i.e. one should explicitly request an exclusive lock? No, that is how the behaviour of this function is defined. Looking

Re: [fpc-pascal] Why opening a file for write fails in fpc 2.6?

2012-10-31 Thread Giuliano Colla
Il 01/11/2012 00:24, Giuliano Colla ha scritto: a legacy DOS mode tied to the long time dead FCB inherited from CP/1, I meant CP/M, of course. Giuliano ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman

Re: [fpc-pascal] Why opening a file for write fails in fpc 2.6?

2012-11-01 Thread Giuliano Colla
Il 01/11/2012 09:28, Tomas Hajny ha scritto: On Thu, November 1, 2012 00:24, Giuliano Colla wrote: Il 31/10/2012 14:45, Jonas Maebe ha scritto: On 31 Oct 2012, at 14:35, Giuliano Colla wrote: . . but if it doesn't it's a Delphi bug, I'd say. What are exceptions

Re: [fpc-pascal] Why opening a file for write fails in fpc 2.6?

2012-11-01 Thread Giuliano Colla
Il 01/11/2012 01:07, Jonas Maebe ha scritto: I'm personally not a big fan of having different behaviour across platforms when it can be avoided without too much trouble, In general I agree with you. I often debate with Lazarus team because, in order to provide native behavior they make it

Re: [fpc-pascal] Why opening a file for write fails in fpc 2.6?

2012-11-01 Thread Giuliano Colla
Il 01/11/2012 11:43, Jonas Maebe ha scritto: On 01 Nov 2012, at 11:40, Giuliano Colla wrote: You may be right, but the try-except construct is there exactly to permit you to handle those situations. However I'd like to point out a significant inconsistency. Please give a look

Re: [fpc-pascal] Why opening a file for write fails in fpc 2.6?

2012-11-01 Thread Giuliano Colla
Il 01/11/2012 11:56, Jonas Maebe ha scritto: On 01 Nov 2012, at 11:50, Giuliano Colla wrote: In general I agree with you. I often debate with Lazarus team because, in order to provide native behavior they make it difficult to achieve consistent look and behavior on different platforms (which

Re: [fpc-pascal] Why opening a file for write fails in fpc 2.6?

2012-11-01 Thread Giuliano Colla
Il 01/11/2012 13:09, Graeme Geldenhuys ha scritto: On 2012-11-01 11:49, Giuliano Colla wrote: Now I'm looking forward with interest to CustomDrawn, which should I've recently (about 3 weeks ago) looked at LCL-CustomDrawn. It is still years away form being usable in production code. Simple things

Re: [fpc-pascal] Why opening a file for write fails in fpc 2.6?

2012-11-02 Thread Giuliano Colla
Graeme Geldenhuys ha scritto: On 2012-11-01 23:32, Giuliano Colla wrote: That's the main reason I look with more interest to LCL than fpGUI. Simply because LCL provides already implemented much more features I need with respect to fpGUI, (at least up to the last time I evaluated fpGUI

Re: [fpc-pascal] Lazarus 1.0.6 Release

2013-02-06 Thread Giuliano Colla
Il 04/02/2013 15:39, Mattias Gaertner ha scritto: The Lazarus team is glad to announce the release of Lazarus 1.0.6. Whoever is interested may download a more broadly compatible version of the rpm's from: http://www.bononiadocta.it/Lazarus/ They're repackaged in order to be compatible with

[fpc-pascal] Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-08 Thread Giuliano Colla
Launching a Lazarus application in a freshly installed Linux system, I found a condition which may be quite confusing for a normal user: the main form was shown, the program didn't work, and there was no way to close the form, which could only be closed by a killall from command line.

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-09 Thread Giuliano Colla
Il 09/02/2013 10:25, Michael Van Canneyt ha scritto: On Sat, 9 Feb 2013, Reinier Olislagers wrote: On 9-2-2013 1:49, Giuliano Colla wrote: It turned out that the reason was simply that the default AppConfigDir (~/.config/ ) wasn't there, and therefore in the two usual lines

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-09 Thread Giuliano Colla
On 02/09/2013 04:19 PM, Michael Van Canneyt wrote: On Sat, 9 Feb 2013, Bart wrote: And in this case the OP still needs to do an extra check (try..except), so basically this does not solve his problem because it is unsolvable without the programmer checking/validating what GetAppConfigDir

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-10 Thread Giuliano Colla
On 02/10/2013 12:43 PM, Graeme Geldenhuys wrote: On 2013-02-09 13:56, Bart wrote: While this can easily be implemented without breaking existing code, this still does not solve the original problem. If creating the directory fails, the function does not return an errorcode, unless we decide to

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-11 Thread Giuliano Colla
Il 11/02/2013 09:21, Michael Van Canneyt ha scritto: On Mon, 11 Feb 2013, Giuliano Colla wrote: 3) But if also the *path* to the file doesn't yet exist, it just crashes without rising an exception that the user application can handle somehow. This is incorrect. It does tell you why

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-11 Thread Giuliano Colla
Il 11/02/2013 12:40, Mark Morgan Lloyd ha scritto: Giuliano Colla wrote: However, what I've learned from this episode is that while attempting to save configuration data using TINIFile on program termination you should never use a try..finally construct, as it's suggested everywhere

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-11 Thread Giuliano Colla
Il 11/02/2013 12:35, Michael Van Canneyt ha scritto: On Mon, 11 Feb 2013, Giuliano Colla wrote: Il 11/02/2013 09:21, Michael Van Canneyt ha scritto: On Mon, 11 Feb 2013, Giuliano Colla wrote: 3) But if also the *path* to the file doesn't yet exist, it just crashes without rising

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-11 Thread Giuliano Colla
On 02/11/2013 01:57 PM, Michael Van Canneyt wrote: On Mon, 11 Feb 2013, Giuliano Colla wrote: It can be helped both by reducing the likelihood of the event, as you've done, and by not suggesting to use in that case a try..finally construct in a GUI application, which would mask the errors

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-11 Thread Giuliano Colla
On 02/11/2013 01:34 PM, Graeme Geldenhuys wrote: On 2013-02-11 11:29, Giuliano Colla wrote: This is true only if you invoke the program from command line, which is something the end user will never do. Wrong. This is something you are doing wrong in your GUI application then. I have loads

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-11 Thread Giuliano Colla
On 02/11/2013 04:45 PM, DaWorm wrote: Lost in the shuffle, wasn't this originally found in Lazarus? Sounds like a bug report for incorrect handling of INI files when the config directory is missing needs to be filed in their bug tracker. INI files and related stuff are part of the fcl

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-11 Thread Giuliano Colla
On 02/11/2013 05:12 PM, Sven Barth wrote: On 11.02.2013 13:18, Sven Barth wrote: Am 11.02.2013 13:06, schrieb Giuliano Colla: Il 11/02/2013 12:35, Michael Van Canneyt ha scritto: On Mon, 11 Feb 2013, Giuliano Colla wrote: Il 11/02/2013 09:21, Michael Van Canneyt ha scritto: On Mon, 11

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-12 Thread Giuliano Colla
On 02/11/2013 09:14 PM, Sven Barth wrote: It would be nice if you could minimize the problemematic code further step by step so that we can see what caused the missing dialog. Maybe it's a bug somewhere else... I've made some further experiments with my minimal test. Test form is just a Form

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-12 Thread Giuliano Colla
On 02/12/2013 10:02 AM, Mark Morgan Lloyd wrote: I admit that I was slightly trolling there, since Giuliano was complaining about exceptions that he wasn't seeing (because, it turns out, he wasn't catching them). You catch an exception if you can handle it. If a user for some reasons has

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-12 Thread Giuliano Colla
On 02/12/2013 01:58 PM, Mattias Gaertner wrote: The LCL has a default exception handler, so that the application notifies the user, that the application has a bug instead of simply crashing and vanishing silently. The programmr is reponsible to handle exceptions, show the user error messages

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-12 Thread Giuliano Colla
On 02/12/2013 02:46 PM, Mark Morgan Lloyd wrote: Giuliano Colla wrote: On 02/12/2013 10:02 AM, Mark Morgan Lloyd wrote: I admit that I was slightly trolling there, since Giuliano was complaining about exceptions that he wasn't seeing (because, it turns out, he wasn't catching them). You

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-13 Thread Giuliano Colla
break any existing applications, just add very useful features. What fpc developers think about that? Giuliano -- Giuliano Colla Before activating the tongue, make sure that the brain is connected (anonymous) ___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-13 Thread Giuliano Colla
Michael Van Canneyt ha scritto: On Wed, 13 Feb 2013, Giuliano Colla wrote: Sven Barth ha scritto: On 13.02.2013 10:11, Lukasz Sokol wrote: On 13/02/2013 07:34, Michael Müller wrote: I'm not sure if somebody else mentioned this already but I have the feeling that Giuliano thinks that he

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-13 Thread Giuliano Colla
, and put in as many holes as he want. After all one is free to insert anywhere in the code a few assembler lines and to break anything fpc developers had in mind.. Giuliano -- Giuliano Colla Before activating the tongue, make sure that the brain is connected (anonymous

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-14 Thread Giuliano Colla
someone will still need nested try..whatever, to deal with situations which do really require the HOLES you mentioned. Giuliano -- Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde) ___ fpc-pascal maillist - fpc

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-14 Thread Giuliano Colla
readability, but I personally don't see a real use for it... You're right. At first glance it appeared to me a good idea, but actually it wouldn't provide anything useful. -- Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde

[fpc-pascal] Re: [fpc-devel] Lazarus 1.0.8 Release

2013-04-07 Thread Giuliano Colla
Il 19/03/2013 10:28, Mattias Gaertner ha scritto: The Lazarus team is glad to announce the release of Lazarus 1.0.8. This is a bug fix release, built with the current fpc 2.6.2. The previous release 1.0.6 was built with 2.6.0. Although with the last updates RHEL5.x and CentOs 5.x do claim to

Re: [fpc-pascal] BoolToStr() with correct locale output

2009-06-26 Thread Giuliano Colla
understandable or localized strings to standardized TRUE/FALSE strings. The opposite of what you needed. No wonder it fails for you. -- Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde) ___ fpc-pascal maillist - fpc

Re: [fpc-pascal] Text IDE under Linux FrameBuffer

2009-09-13 Thread Giuliano Colla
Graeme Geldenhuys ha scritto: 2009/9/13 Nikolay Nikolov nick...@users.sourceforge.net: Could you provide some more information? Which distro are you using? What's your locale (i.e. the value of the LANG environment variable)? And which I'm using Ubuntu 8.04 and Ubuntu 9.04 on x86

[fpc-pascal] Re: [Lazarus] OT: Happy new year

2009-12-31 Thread Giuliano Colla
I join Ido in wishing you all a very happy new year. To Ido, shana tova umetukah. Giuliano ik ha scritto: Hello All, Sorry for the offtopic, but I wish you all happy new year. I hope that in 2010 we'll see Pascal, FPC and Lazarus become more main stream. Have a great new year and

Re: [fpc-pascal] GetTempFileName in Linux

2010-10-07 Thread Giuliano Colla
functionality can be reimplemented in fpc, using libc implementation as a guideline to maintain consistency in Unix environment. Giuliano -- Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde) ___ fpc-pascal maillist

[fpc-pascal] PathOnly is left empty in fpc 2.2.0

2008-01-21 Thread Giuliano Colla
supported. Giuliano -- Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Where to find WinProcs or equivalent unit

2008-01-26 Thread Giuliano Colla
the relevant information Giuliano -- Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] problem with interface (OOP not widget)

2008-01-29 Thread Giuliano Colla
, and it works. Did you try such a brute force approach? Giuliano -- Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo

Re: [fpc-pascal] lul.pas does not compile with fpc 2.2.0

2008-02-09 Thread Giuliano Colla
Skybuck Flying ha scritto: Doesn't make much sense to me at least. Who still codes in 16 bit or turbo pascal ? 64 KB programs ? Terrible limitations. I am glad those days are dead/gone/over. If you want Delphi mode, you just put {$Mode Delphi} at the beginning of your unit, among the other

Re: [fpc-pascal] Skybuck's ODE approved by sourceforge :)

2008-02-12 Thread Giuliano Colla
Skybuck Flying ha scritto: Look in the subversion folder. Current version is 0.04 I gave a look. The only code I found there is: 94 procedure TForm1.FileListBox1Click(Sender: TObject); 95 begin 96 if FileExists( FileListBox1.FileName ) then 97 begin 98

Re: [fpc-pascal] the libc unit (again)

2008-02-23 Thread Giuliano Colla
. Giuliano -- Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] the libc unit (again)

2008-02-23 Thread Giuliano Colla
ik ha scritto: On Sat, Feb 23, 2008 at 2:26 PM, Giuliano Colla [EMAIL PROTECTED] wrote: Marco van de Voort ha scritto: Hello, I find more and more units and components (for Lazarus) that are using the libc unit. I find it really problematic, because it doesn't exists for all

Re: [fpc-pascal] the libc unit (again)

2008-02-23 Thread Giuliano Colla
Mattias Gaertner ha scritto: On Sat, 23 Feb 2008 15:45:22 +0100 Giuliano Colla [EMAIL PROTECTED] wrote: [...] Tanks for the hint, but grep (or Find in Files from IDE) has the big disadvantage that you don't find only the declaration, but also all the references. You search FindFirst

Re: [fpc-pascal] A question or two regarding the FPC

2009-05-12 Thread Giuliano Colla
maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- Giuliano Colla Whenever people

Re: [fpc-pascal] fpmake: output directories

2009-06-02 Thread Giuliano Colla
Michael Van Canneyt ha scritto: On Tue, 2 Jun 2009, Graeme Geldenhuys wrote: 2009/6/2 Michael Van Canneyt mich...@freepascal.org: ~user/.fppkg/build/ (or something like it) Possibly the $HOME/.local/ directory. I have the following structure in there, but I tried to find out on

[fpc-pascal] nonlcl widgetsets

2014-06-11 Thread Giuliano Colla
Hi fpc wizards, I'm interested in the nonlcl topic, and I tested the source found in the examples (designnonlcl). But, getting it from trunk I stumbled into an error: in the module mywidgetdesigner.pas, /procedure GetObjInspNodeImageIndex(APersistent: TPersistent; var AIndex: integer);

Re: [fpc-pascal] nonlcl widgetsets

2014-06-11 Thread Giuliano Colla
Il 11/06/2014 14:11, Sven Barth ha scritto: You should better ask this on Lazarus list. It might be non-LCL, but it's not non-Lazarus ;) I was mistaken because I found the reference on a post of Michael in this list. Sorry for the noise. Giuliano

[fpc-pascal] how to activate debug info

2014-07-18 Thread Giuliano Colla
Hi fpc team. When I need to understand how some code works, I frequently use the debugger, and single-step. But when debugging Lazarus applications, I can single-step through user code and Lazarus code only, while fpc code is skipped. I presume that this is happening because my fpc binary is

Re: [fpc-pascal] how to activate debug info

2014-07-18 Thread Giuliano Colla
Il 18/07/2014 14:30, Sven Barth ha scritto: Am 18.07.2014 14:09 schrieb Giuliano Colla giuliano.co...@fastwebnet.it mailto:giuliano.co...@fastwebnet.it: Hi fpc team. When I need to understand how some code works, I frequently use the debugger, and single-step. But when debugging Lazarus

Re: [fpc-pascal] with statement using mulltiple objects

2014-09-16 Thread Giuliano Colla
Il 16/09/2014 12:26, Philippe ha scritto: could the compiler avoid with pitfalls? The with construct can be very handy, but should be used with caution, like a lot of other constructs, declarations, etc. E.g. for symbols present with the same name in different units, depending on the

[fpc-pascal] Mapping Cairo pixmap to FPC Bitmap and back

2014-09-21 Thread Giuliano Colla
Could anyone more knowledgeable than me point me in the right direction to find how a Cairo pixmap maps into a FPC Bitmap, and possibly to some existing code for doing the trick of converting from the one to the other, thus saving me hours of searching? Thanks in advance for any hint.

Re: [fpc-pascal] Mapping Cairo pixmap to FPC Bitmap and back

2014-09-22 Thread Giuliano Colla
access (possible also with LCL.TBitmap in some cases) https://code.google.com/p/luipack/source/browse/trunk/cairo/imaging/cairoimaging.pas#116 Luiz 2014-09-21 19:10 GMT-03:00 Giuliano Colla giuliano.co...@fastwebnet.it mailto:giuliano.co...@fastwebnet.it: Could anyone more knowledgeable

Re: [fpc-pascal] Trying to register a Windows Service gives error

2014-10-10 Thread Giuliano Colla
advantage from it, no matter how long is the disclaimer. Giuliano -- Giuliano Colla Project planning question: when it's 90% done, are we halfway or not yet? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi

Re: [fpc-pascal] FormatSettings not updated in Linux

2015-01-02 Thread Giuliano Colla
Il 02/01/2015 13:47, Jonas Maebe ha scritto: On 02/01/15 13:35, Giuliano Colla wrote: Contrary to what written in docs, DefaultFormatSettings aren't adjusted to the current locale in Linux at the startup of an application both on fpc 2.6.4 and on fpc 2.7.1. Where is this written? At least http

[fpc-pascal] FormatSettings not updated in Linux

2015-01-02 Thread Giuliano Colla
. Did someone forget to add cloclale to the uses section of /rtl/unix/sysutils.pp or there's another reason for this? Giuliano -- Giuliano Colla Project planning question: when it's 90% done, are we halfway or not yet? ___ fpc-pascal maillist - fpc

[fpc-pascal] THashedStringList.IndexOfName returns bogus value for empty string

2015-03-15 Thread Giuliano Colla
an issue in the bugtracker? Giuliano -- Giuliano Colla Project planning question: when it's 90% done, are we halfway or not yet? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread Giuliano Colla
/liblinux64/ ? Once supplied the right folder, this should be sufficient to make the loader search the proper file. Giuliano -- Giuliano Colla Project planning question: when it's 90% done, are we halfway or not yet? ___ fpc-pascal maillist - fpc

Re: [fpc-pascal] IfThen() intrinsic removed

2016-02-05 Thread Giuliano Colla
Il 05/02/2016 10:58, Michael Van Canneyt ha scritto: And please remember, we do not NEED this construct; the added value is marginal as I indicated. Simply not adding is an option. Not all change is necessarily progress. +1 C philosophy is to save *typing* time. Pascal philosophy is to save

Re: [fpc-pascal] Happy tickets benchmark

2016-02-14 Thread Giuliano Colla
Il 14/02/2016 11:09, Florian Klaempfl ha scritto: But actually, before bothering randomly with command line options, I would just rewrite the inner loop. Something like for n7 := 0 to 9 do if n1 + n2 + n3 + n4 - n5 - n6 - n7 in [0..9] then

Re: [fpc-pascal] old school crc32

2016-07-24 Thread Giuliano Colla
Il 24/07/2016 01:18, wkitt...@windstream.net ha scritto: this is driving me battier than i already am :( i have a binary file that contains a record of data... the first field of the data is a crc32 value of a string of characters... the string of characters is lower cased before being fed

Re: [fpc-pascal] unable to compile 3.0.0 both Linux x86_64 and arm-linux

2016-07-17 Thread Giuliano Colla
Il 17/07/2016 17:34, Jonas Maebe ha scritto: Try adding OPT=-va FPMAKEOPT=-v to the make invocation and check the output to see whether the compiler is picking up any extra configuration files or options somehow. That's it! I had just pasted from the wiki page an extra fpc.cfg for cross

Re: [fpc-pascal] unable to compile 3.0.0 both Linux x86_64 and arm-linux

2016-07-17 Thread Giuliano Colla
Il 17/07/2016 20:01, Jonas Maebe ha scritto: Could you edit that wiki page and remove the -Sd so other people won't run in the same problem? Thanks. Sorry, bad link. That's the good one: http://wiki.freepascal.org/Setup_Cross_Compile_For_ARM#Create_custom_fpc.cfg Giuliano

Re: [fpc-pascal] unable to compile 3.0.0 both Linux x86_64 and arm-linux

2016-07-16 Thread Giuliano Colla
Il 16/07/2016 15:52, Jonas Maebe ha scritto: These errors suggest you are not compiling that unit in FPC mode. If you use the top level Makefile in the fpcsrc directory, it will compile the packages directory with RELEASE=1, which in turn causes -n to be added to the FPC command line options

[fpc-pascal] unable to compile 3.0.0 both Linux x86_64 and arm-linux

2016-07-16 Thread Giuliano Colla
Hello, I'm trying to upgrade from fpc 2.6.4 to 3.0.0 but make all fails both in Linux x86_64 platfoms and in arm-linux (Raspbian) plaform. I've downloaded a precompiled 3.0.0 in order to be able to compile. I have also tried using fpcup, but the result is the same in all cases: while

Re: [fpc-pascal] unable to compile 3.0.0 both Linux x86_64 and arm-linux

2016-07-17 Thread Giuliano Colla
Il 17/07/2016 20:01, Jonas Maebe ha scritto: Could you edit that wiki page and remove the -Sd so other people won't run in the same problem? Thanks. Done. http://wiki.freepascal.org/Setup_Cross_Compile_For_ARM#Configure_Lazarus_for_cross_Compile I was planning to edit this page when I was

Re: [fpc-pascal] THashedStringList doesn't honour CaseSensitive?

2016-09-06 Thread Giuliano Colla
Il 02/09/2016 14:20, Michael Van Canneyt ha scritto: On Fri, 2 Sep 2016, Giuliano Colla wrote: In my application I stumbled into a problem with a search in a HashedStringList: IndexOfName doesn't return the proper index if the search string doesn't match the name case, even if CaseSensitive

[fpc-pascal] THashedStringList doesn't honour CaseSensitive?

2016-09-02 Thread Giuliano Colla
In my application I stumbled into a problem with a search in a HashedStringList: IndexOfName doesn't return the proper index if the search string doesn't match the name case, even if CaseSensitive is set to false. For common sense and Delphi compatibility

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-09 Thread Giuliano Colla
Il 09/09/2016 10:17, Graeme Geldenhuys ha scritto: Unfortunately I don't have any other 32-bit FreeBSD VM where I can install FPC 3.0.0 on. I know that you don't like automated scripts, but you should consider fpcup (or fpclazup), in order to experiment with different fpc/Lazarus versions.

Re: [fpc-pascal] INVALID_SOCKET constant not defined for Linux

2017-03-28 Thread Giuliano Colla
Il 28/03/2017 12:34, LacaK ha scritto: This technique is used in fcl-net which should be cross-platform. So I am right, when I say that also in Linux invald socket = -1 (in other words: in case of error syscall() returns always -1) Becuase in other place I see another test "if socket < 0 then

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-22 Thread Giuliano Colla
Il 22/03/2017 14:21, Karoly Balogh (Charlie/SGR) ha scritto: Hi, On Wed, 22 Mar 2017, Giuliano Colla wrote: Il 22/03/2017 13:20, James Richters ha scritto: No, it is not only freepascal, but not every program either. A wild guess. The vilain could be the journal logic. Wild indeed

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Giuliano Colla
Il 23/03/2017 17:19, Sven Barth via fpc-pascal ha scritto: In the end you'll just need the correct units to do GUI applications as well though one would need to do everything by hand as there'd be no VCL or FM :P IOW with the newest Delphi for Linux you're in a worse condition than using old

Re: [fpc-pascal] Hash List

2017-03-17 Thread Giuliano Colla
Il 18/03/2017 00:29, African Wild Dog ha scritto: Ia there any hash list implementation in free Pascal? The IniFiles unit (fpc/packages/fcl-base/src/inifiles.pp) provides a THashedStringList (descendant from TstringList) which I'm using reliably since many years. Giuliano

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-22 Thread Giuliano Colla
Il 22/03/2017 13:20, James Richters ha scritto: No, it is not only freepascal, but not every program either. A wild guess. The vilain could be the journal logic. The journal tells that the write operation has not been completed at power off, and restores the last valid version of the file,

Re: [fpc-pascal] Threading vs Parallelism ?

2017-04-12 Thread Giuliano Colla
Il 30/03/2017 00:26, fredvs ha scritto: Perfect, I have now all the arguments to defend the "Dinosaur Threading" choice. When I'm charged of not using the most cool and new technology, my favourite argument are the tombstones. They're made out of stone, which is a stone-age technology. But,

Re: [fpc-pascal] Bug in documentation for Random?

2017-04-05 Thread Giuliano Colla
Il 05/04/2017 18:09, Bart ha scritto: http://www.freepascal.org/docs-html/current/rtl/system/random.html "Random returns a random number larger or equal to 0 and strictly less than L" However random(a negative number) returns a number <= 0 and > L program r; begin randomize;

Re: [fpc-pascal] Hash List

2017-04-13 Thread Giuliano Colla
Il 12/04/2017 15:57, Michael Van Canneyt ha scritto: we could put it in contnrs, and alias it in inifiles.pp +1 Giuliano ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Correct syntax for initialized constants/variables

2017-04-27 Thread Giuliano Colla
Il 27/04/2017 20:49, Ralf Quint ha scritto: I see in the reference docs (section 4.4) examples for arrays and examples for records, but in my case, I would need to properly define an array of records. Any hint/example for the proper syntax in that case would be deeply appreciated, it's

Re: [fpc-pascal] Error building FPC 3.0.2 from svn sources on RPi3

2017-05-30 Thread Giuliano Colla
Il 29/05/2017 23:28, Bo Berglund ha scritto: I have bought and initialized a new RPi3 today. It runs Raspbian Jessie PIXEL latest version. I don't know what you're going to use your RPi3 for, but just in case, are you aware that now you can install an RT_PREEMPT kernel, and enjoy the

Re: [fpc-pascal] Error building FPC 3.0.2 from svn sources on RPi3

2017-06-04 Thread Giuliano Colla
Il 04/06/2017 08:02, Bo Berglund ha scritto: But I also have other systems where a real time system would be handy. Do you have more info on this? Yes. There was a bug in the way the FIQ was handled in a multicore ARM CPU (i.e. RPi2 and RPi3) , which was causing random freezes, not much

Re: [fpc-pascal] OT: what happened with the Lazarus mailing list?

2017-11-25 Thread Giuliano Colla
Il 25/11/2017 09:29, Lubos Pintes ha scritto: I don't know if the problem is somewhere on my side, but the latest message in Lazarus mailing list on gmane.org is from November 17. Same here. I'm subscribed to the Lazarus mailing list, but last message i got is of nov 17, 10:23. Giuliano

Re: [fpc-pascal] Is there some example of an FPC program for use in svn hook calls (email)?

2017-12-14 Thread Giuliano Colla
Il 14/12/2017 18:02, Bo Berglund ha scritto: But*sending email* is not the problem, I have done this in many applications using Indy TIdSMTP. Instead it is getting data out oof svn and formatting these in a friendly looking email to be sent You might find useful guidelines in the fpcup

Re: [fpc-pascal] installing cross fpc in parallel to systems fpc

2017-11-09 Thread Giuliano Colla
Il 09/11/2017 02:36, Marc Santhoff ha scritto: how does fpc and it's makefiles handle the case of installing a cross compiler on a system having fpc installed? The target path will differ and I can set that, but how is the config file .fpc.cfg handled? You may edit your fpc.cfg for your

Re: [fpc-pascal] installing cross fpc in parallel to systems fpc

2017-11-09 Thread Giuliano Colla
Il 09/11/2017 22:56, Marc Santhoff ha scritto: I see, so when using fpc for ARM these define is automatically set? Yes And would that be CPUAVR for Atmels chips? Not sure about that. I never used fpc on Atmel chips. When I'm in doubt about the conditional defines, I either google or take

[fpc-pascal] Unable to compile fpc 3.0.4

2017-12-09 Thread Giuliano Colla
I've stumbled into a problem. On one platform (linux x86_64, distro is CentOs6) I'm unable to compile fpc packages of fpc 3.0.4 The compiler is successful but the package compilation fails on package paszlib. The error given is zbase.pas(446,7) Error: Illegal expression zbase.pas(447,36)

Re: [fpc-pascal] Unable to compile fpc 3.0.4

2017-12-09 Thread Giuliano Colla
Il 09/12/2017 22:06, Pierre Muller ha scritto: Simply try to run make but adding -n to Free Pascal compiler options, simply by using make OPT=-n or make OPT="-n ALL_OPTIONS_YOU_USED_BEFORE" OPT=-n did the trick. It remains obscure to me while paszlib did origin to the problem, while other

Re: [fpc-pascal] Anchors on a child form

2018-06-04 Thread Giuliano Colla
Il 03/06/2018 14:06, Martin Wynne ha scritto: I'm porting a project to Lazarus from Delphi5, where it works fine. Child forms can be dragged around even with the top and left anchors set. Thanks for any help in fixing this This appears to be a topic for the Lazarus list, as it appears that

Re: [fpc-pascal] Anchors on a child form

2018-06-04 Thread Giuliano Colla
Il 04/06/2018 14:06, Martin Wynne ha scritto: uses Unit1; procedure TForm2.FormCreate(Sender: TObject); begin   Parent:=Form1;   Anchors:=[];   Visible:=True; end; 4. run it, and the debugger will show the error message. Just remove the two lines Parent:= Form1; (which is wrong, because it

Re: [fpc-pascal] Daemon using TTimer on Windows

2018-07-03 Thread Giuliano Colla
Il 03/07/2018 15:14, Marcos Douglas B. Santos ha scritto: Can we sleep a thread for minutes or even hours without any problems? The OS will not kill the thread? On Linux environment, sample situation on one of our servers: ├─hald───hald-runner─┬─hald-addon-acpi │ ├─hald-addon-keyb │

Re: [fpc-pascal] What happened to FileOpen in trunk?

2017-12-27 Thread Giuliano Colla
Il 27/12/2017 18:40, Michael Van Canneyt ha scritto: Your code was simply lucky to work in the beginning. It's not guaranteed that passing OS-Specific options to FileOpen will work. using fpOpen is the correct method, since you're using OS-specific features. Understood. Thanks a lot.

Re: [fpc-pascal] Translate C code

2018-01-06 Thread Giuliano Colla
Il 06/01/2018 01:39, Darius Blaszyk ha scritto: #define MEMNEXT(x) ((MyStruct *)(((char *) x) - ((char *) & (((MyStruct *)0)->next h2pas translates it into the enclosed file. Hope that it helps. Giuliano darius.pp Description: application/wine-extension-pp

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Giuliano Colla
Il 08/01/2018 21:30, Graeme Geldenhuys ha scritto: I was horified to find out how much slower Delphi's Generics were compared to TList and TObjectList I don't expect FPC behave much better. Whenever you move something from compile time to execution time you may gain in flexibility, but you

  1   2   >