Re: [fpc-pascal] What to do to get new users

2024-10-19 Thread Juha Manninen via fpc-pascal
On Thu, Oct 17, 2024 at 10:08 AM Michael Van Canneyt via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > My wife creates websites for a living. > I nearly had to re-animate her after she looked at the FPC website. > The FPC website is a no-go area for her since that time. > > Hence my int

Re: [fpc-pascal] Error: Argument cannot be assigned to

2023-06-04 Thread Juha Manninen via fpc-pascal
OK, I understand mostly. Thanks. Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Error: Argument cannot be assigned to

2023-06-04 Thread Juha Manninen via fpc-pascal
On Sunday, June 4, 2023, Mattias Gaertner via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > Correct. Property RecInstance is read only. > No, I can define it as : property RecInstance: TMyRec read fRecInstance write fRecInstance; and still get the same error. Juha

Re: [fpc-pascal] Error: Argument cannot be assigned to

2023-06-04 Thread Juha Manninen via fpc-pascal
Formatting was a little weird. This is what I meant, but the error remains : type TMyRec = record ss: String; ii: Integer; end; TMyClass = class private fName: String; fRecInstance: TMyRec; public property RecInstance: TMyRec read fRecInstance;// write fRecInstance;

Re: [fpc-pascal] Error: Argument cannot be assigned to

2023-06-04 Thread Juha Manninen via fpc-pascal
Compiler version is FPC 3.2.2 on Linux. Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Error: Argument cannot be assigned to

2023-06-04 Thread Juha Manninen via fpc-pascal
Why the following code fails to compile? type TMyRec = record ss: String; ii: Integer; end; TMyClass = class private fName: String; fRecInstance: TMyRec; property RecInstance: TMyRec read fRecInstance;// write fRecInstance; end; var MyObj : TMyClass; begin MyObj

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-09 Thread Juha Manninen via fpc-pascal
On Wed, Sep 9, 2020 at 11:40 AM Bart via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > This is a bit counter intuitive to me. It is explained here: https://wiki.freepascal.org/Unicode_Support_in_Lazarus For LacaK I recommend using UTF-8 encoding as much as possible. Then everything "*ju

Re: [fpc-pascal] Wine + Unsupported ioctl

2020-04-04 Thread Juha Manninen via fpc-pascal
On Sat, Apr 4, 2020 at 10:48 PM fredvs via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > Not sure to understand. > > So is it ok, only a warning to fix "Unsupported ioctl" or the linking still > fails? > After Alexander Grotewohl's reply I understood the only line with text "error" is th

Re: [fpc-pascal] Wine + Unsupported ioctl

2020-04-04 Thread Juha Manninen via fpc-pascal
On Sat, Apr 4, 2020 at 10:13 PM Juha Manninen wrote: > Lazarus source dir is a symlink to my current sources. It should AFAIK. (?) > Should be: "It should work as far as I know." My brain capacity is getting low after some bug fixing etc. ___

Re: [fpc-pascal] Wine + Unsupported ioctl

2020-04-04 Thread Juha Manninen via fpc-pascal
On Sat, Apr 4, 2020 at 8:43 PM Alexander Grotewohl wrote: > my guess is that function of wine is unimplemented (pretends to work but > does nothing) > try to see if you can fix the cause of the second error? does wine handle > relative paths gracefully? > Ok, the fatal error was the "Path "..\"

[fpc-pascal] Wine + Unsupported ioctl

2020-04-04 Thread Juha Manninen via fpc-pascal
Hello I installed FPC 3.2RC1 Win32 version under Wine in Linux Manjaro 64-bit. Wine version is a recent 5.5-1. Compiling a hello.lpr program works. Then I made a symbolic link for my Lazarus trunk sources and tried to build with both "make all" and "make bigide". All components compile well but wi

Re: [fpc-pascal] Will moving from due core CPU to 6 Core CPU of the same clock speed improve the speed of FPC compiling?

2018-10-16 Thread Juha Manninen
Computers have been fast enough for many years already, except for the latest 3-D games and some special tasks maybe. I have used an AsRock BeeBox TV-box with a passively cooled Celeron N3000 mobile CPU for few years now as my main computer. It still feels fast! I bet the dual port RAM and SSDs hel

Re: [fpc-pascal] Advanced note: local variable "i" is assigned but never used?

2018-02-20 Thread Juha Manninen
Try with flag -OoDFA Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] re-engineering tool

2018-01-08 Thread Juha Manninen
On Sat, Jan 6, 2018 at 11:46 AM, Marc Santhoff wrote: > Since I'm confronted with the task of analyzing a pile of object pascal > sources I'd like to know: > > Is there any tool that can help me? > > Automatically generating a visual class diagram having uses and > aggregation of other classes wou

Re: [fpc-pascal] How is EntryInformation.OS.haltproc assigned?

2017-12-09 Thread Juha Manninen
On Tue, Dec 5, 2017 at 7:28 PM, Victor Campillo wrote: > I don't know if you have only the problem with Manjaro Linux, but in case it > helps I just made a few test building a few Qt LCL examples with Lazarus > Trunk + FPC trunk in Xubuntu 64-bit and does not get any access violation. Thanks for

[fpc-pascal] How is EntryInformation.OS.haltproc assigned?

2017-12-04 Thread Juha Manninen
I am testing with a 64-bit Manjaro Linux. I get an access violation when closing any LCL application built with QT bindings using FPC trunk. When using FPC 3.0.2 there was no access violation, and neither with other widgetsets. Only FPC trunk + QT posed a problem. I remember seeing this for some ti

Re: [fpc-pascal] FPC vs. Lazarus regarding some units...

2017-10-29 Thread Juha Manninen
On Sun, Oct 29, 2017 at 5:28 PM, wrote: > does the delphi conversion system convert those MMSystem calls > to something else? Now the converter just removes MMSystem from uses section. I don't know how it should be converted. Maybe it should be left untouched. > i remember seeing something abou

Re: [fpc-pascal] FPC vs. Lazarus regarding some units...

2017-10-29 Thread Juha Manninen
On Sun, Oct 29, 2017 at 2:53 AM, Cleverson Casarin Uliana wrote: > Why some units like the mentioned MMSystem are > delivered with Lazarus but not with FPC? MMSystem is not delivered with Lazarus. I don't know what you are writing about. Juha ___ fpc-p

Re: [fpc-pascal] compiler option for $J directive

2017-10-10 Thread Juha Manninen
On Tue, Oct 10, 2017 at 9:33 AM, wrote: > Now a patch has been integrated for this , perhaps it could be added to > Lazarus Project Options | Compiler Options | Parsing Patches are welcome also for that. The option must be either hidden for compiler versions that do not support it, or there mus

Re: [fpc-pascal] Usage of TFPCustomImage

2017-06-13 Thread Juha Manninen
On Tue, Jun 13, 2017 at 5:20 PM, Michael Van Canneyt wrote: > However, this method of loading an image depends on the order of the uses > statements: each registered reader is asked in turn whether it recognizes > the stream. The unit IntfGraphics in LCL does not have unit FPReadPNM in its uses c

[fpc-pascal] Usage of TFPCustomImage

2017-06-13 Thread Juha Manninen
The class TFPCustomImage and its usage has apparently changed in FPC 3.0.2 (and trunk) compared to FPC 3.0. This issue: https://bugs.freepascal.org/view.php?id=32005 is marked for TLazIntfImage (in LCL) but actually the problematic procedure LoadFromStream is in TFPCustomImage. Please read my no

Re: [fpc-pascal] FPC clean room project

2017-01-07 Thread Juha Manninen
On Fri, Jan 6, 2017 at 6:41 PM, Michael Schnell wrote: > Can you use the toolkit plus fpc to compile and run Delphi Firemonkey > application source code (after a decent amount of tweaking) ? No. You should continue a Firemonkey discussion in fpc-other list, as Tomas Hajny suggested. Juha __

Re: [fpc-pascal] FPC 3.0.2 Release Date

2016-11-26 Thread Juha Manninen
FPC 3.0 was released exactly a year ago: http://forum.lazarus.freepascal.org/index.php/topic,30529.0.html Over a year is a very long time for a bug fix release. Will it happen this year? There is a month + few days left. There was a documentation tool issue holding it back. It can be fixed later.

Re: [fpc-pascal] Using for-loop index variable after loop

2016-10-10 Thread Juha Manninen
On Mon, Oct 10, 2016 at 3:07 PM, Vojtěch Čihák wrote: > Hi, if you mean this: > ... Yes, that is one of them. The code does not make sense in any case, regardless of "i"'s value. Index for cActionListEditorUnknownCategory and cActionListEditorAllCategory differ. "i" cannot have both at the same t

[fpc-pascal] Using for-loop index variable after loop

2016-10-10 Thread Juha Manninen
I have always avoided using a for-loop index variable after the loop. I thought its value can be unpredictable in some situations when the compiler reuses its register or memory etc. I noticed the ActionListEditor in Lazarus sources has code that uses it after the loop. The compiler, FPC 3.0, does

Re: [fpc-pascal] FPC sources in FreeBSD

2016-07-09 Thread Juha Manninen
On Sat, Jul 9, 2016 at 4:34 PM, Marc Santhoff wrote: > So you know about dot-names for hidden files and other basics. ;) Yes sure. Now I have apparently forgotten much of what I learned a long time ago, although it comes back after some repetition. Juha __

Re: [fpc-pascal] FPC sources in FreeBSD

2016-07-09 Thread Juha Manninen
Thanks everybody for help and comments. My memory is recovering slowly about keyboard configuration. It was many years ago I did it manually for Linux distros. But yes, "setxkbmap fi" in .xinitrc did the job. I confused "pkg" and "ports". Must learn more about the topic. I am quite happy with my

[fpc-pascal] FPC sources in FreeBSD

2016-07-08 Thread Juha Manninen
Hello I installed FreeBSD 10.3 under VirtualBox. This is the first time I use FreeBSD. Cool! I managed to install X, XFCE and all applications I need. FPC and Lazarus both work. Only thing missing now is FPC source code, needed by Lazarus. Can it be installed from ports with "pkg" command? I don'

Re: [fpc-pascal] Conditional code for FPC modes

2016-06-15 Thread Juha Manninen
More accurately, I want to check {$ModeSwitch UnicodeStrings}. Anyway, if there is no define, I can use: {$IF SizeOf(Char) = 2} Works well although the highlighter in Lazarus editor shows it wrong. Juha ___ fpc-pascal maillist - fpc-pascal@lists.fr

[fpc-pascal] Conditional code for FPC modes

2016-06-15 Thread Juha Manninen
Are there defines matching the modes in FPC, for example {$mode delphiunicode} ? I want to do something like : {$IFDEF delphiunicode} ... {$ELSE} ... {$ENDIF} Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fre

Re: [fpc-pascal] FPC 3 regression: cannot use TStringList for UTF-8 data any more?

2016-04-04 Thread Juha Manninen
On Mon, Apr 4, 2016 at 12:52 PM, Graeme Geldenhuys wrote: > This is the FPC mailing list. Not everybody here uses Lazarus or LCL, so > making such a suggestion is wishful thinking. For example, your > suggestion means nothing to me, I don't use LCL. Yes, I should have mentioned that this feature

Re: [fpc-pascal] FPC 3 regression: cannot use TStringList for UTF-8 data any more?

2016-04-04 Thread Juha Manninen
On Mon, Apr 4, 2016 at 11:18 AM, wrote: > I use TStringList for UTF-8 strings. This is no longer possible, because > automatic conversions cause question marks and data loss. You are completely lost with this issue. The automatic conversion of encodings is a big step forward. Just use the new UT

Re: [fpc-pascal] FPC 3: disabling automatic AnsiString codepage conversion

2016-04-04 Thread Juha Manninen
On Mon, Apr 4, 2016 at 11:36 AM, wrote: > Sorry, I was not able to come to that conclusion from the existing docs. Your question was not about Lazarus but maybe you should read this: http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus It works also without LCL. The bottom line is: rem

Re: [fpc-pascal] cwstrings unit and UTF8Decode()

2016-03-25 Thread Juha Manninen
On Fri, Mar 25, 2016 at 7:14 PM, Bart wrote: > It's just a define to signal that all strings in LCL are UTF8 and when > offered to RTL their codepage is CP_UTF8. Not only in LCL. Package LazUtils / unit LazUTF8 can be used also without LCL. http://wiki.freepascal.org/Better_Unicode_Support_in_

Re: [fpc-pascal] IsValidIdent() with dots

2016-03-23 Thread Juha Manninen
On Wed, Mar 23, 2016 at 10:52 AM, Mattias Gaertner wrote: > FPC 3.1.1 has Ok, it cannot be used yet. I will make it conditional later. Thanks. Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/

[fpc-pascal] IsValidIdent() with dots

2016-03-23 Thread Juha Manninen
Hi Is there a function like IsValidIdent but accepting also dots (.), as in name "TForm1.Action1Execute"? While fixing a bug: http://bugs.freepascal.org/view.php?id=25954 I copied and modified IsValidIdent. It was easy to do, sure, but I would prefer to reuse an existing function especialy beca

Re: [fpc-pascal] Lazarus Release 1.6

2016-02-20 Thread Juha Manninen
On Sun, Feb 21, 2016 at 2:28 AM, Philippe Lévi wrote: > I still do not understand the reason why the size is 10 times bigger after > rebuilding Lazarus ... Open Tools -> Configure "Build Lazarus" ... dialog. Select profile "Optimized IDE". You can also use -O3 optimization in options. Then build

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Juha Manninen
On Wed, Feb 10, 2016 at 9:12 PM, Anthony Walter wrote: > And could the IDE be enhanced to should which unit is > ultimately including a file? Obviously the CodeTools already knows, it was > able to deduce the identifier exists and that it has a declaration by > looking through the units in the use

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Juha Manninen
On Wed, Feb 10, 2016 at 4:09 PM, Sven Barth wrote: > What about include files included by other include files? Ok, that is a nasty situation. I think it should be avoided. Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fr

Re: [fpc-pascal] Please someone explain this to me

2016-02-10 Thread Juha Manninen
On Wed, Feb 10, 2016 at 2:01 AM, Vojtěch Čihák wrote: > There exists IDE directive > > {%MainUnit ***.pas} > > and include files should contain it. Yes, that is the solution for Anthony's problem. Most include files used by LCL units have it but FPC libraries may not. When the directive is set, L

Re: [fpc-pascal] FPC 3 inclusion for debian/ubuntu?

2015-12-14 Thread Juha Manninen
On Mon, Dec 14, 2015 at 2:33 PM, Xiangrong Fang wrote: > However, there is no MIPS build. To build fpc executables for MIPS, I have > to do cross-compiling? FYI, apparently FPC works with MIPS through cross-compiling but Lazarus does not, based on this: http://forum.lazarus.freepascal.org/index

Re: [fpc-pascal] Implementing Factory Method with Pascal

2015-11-28 Thread Juha Manninen
On Sat, Nov 28, 2015 at 2:07 PM, Marcos Douglas wrote: > Even using virtual constructors, the factory will know only one > signature to instantiate objects. Yes and often that is enough. A constructor is then part of the API. (Lets call it API now to avoid confusion with the "interface" keyword.)

Re: [fpc-pascal] Implementing Factory Method with Pascal

2015-11-28 Thread Juha Manninen
On Sat, Nov 28, 2015 at 1:48 AM, Marcos Douglas wrote: > Another tip: Factories resolve some problems but there is a cost. The > factory will creates your instance (object) but it know only one > constructor, ie, the base class constructor. No, the constructor must then be virtual. Inheritance is

[fpc-pascal] FPC 3.0 + MIPS Linux

2015-11-27 Thread Juha Manninen
According to this : http://forum.lazarus.freepascal.org/index.php/topic,30500.msg194271.html FPC 3.0 MIPS version for Linux works through cross-compilation. It is not mentioned in release notes. Android + MIPS is mentioned. I may buy a MIPS gadget later to see why Lazarus does not work. I belie

Re: [fpc-pascal] FPC Pestering Peacock (3.0.0) release

2015-11-27 Thread Juha Manninen
How to get ARM Linux version for Raspberry Pi? BTW, you really should improve the download links. Now a user can select his CPU / platform from here: http://www.freepascal.org/download.var It looks good so far. Then he selects eg. Intel/i386 - FreeBSD. There is a top link for SourceForge which l

Re: [fpc-pascal] Screwed FPC installation in Xubuntu

2015-09-29 Thread Juha Manninen
On Tue, Sep 29, 2015 at 11:00 AM, Marco van de Voort wrote: > Did you install as root ? The sh script iirc only installs fpc.cfg in > global dirs as root and otherwise locally as ~/.fpc.cfg Oops, I found the error. I had installed the 32-bit version of FPC 3RC1. "Free Pascal Compiler version 3.

[fpc-pascal] Screwed FPC installation in Xubuntu

2015-09-28 Thread Juha Manninen
I was able to get my Xubuntu 15.10 into a state where FPC doesn't work even if I remove and install again from repo. I tried installing FPC 3RC1 but then removed all traces of it. At one point there were links to /etc/alternative created by the Ubuntu package system. After removing everything and t

Re: [fpc-pascal] which GUI (noob)

2015-08-05 Thread Juha Manninen
On Wed, Aug 5, 2015 at 2:02 AM, Peter wrote: > Well, thats good news then. I couldn't find any mention of QT5 in the wiki. The QT5 binding libs can be found in section "V2.6Alpha (Qt 5.1.X)" at page http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html In fact I recently asked in lazarus-

Re: [fpc-pascal] which GUI (noob)

2015-08-04 Thread Juha Manninen
On Tue, Aug 4, 2015 at 6:11 PM, Peter wrote: > On 03/08/15 15:41, Gour wrote: > I would advise anyway against using LCL (Qt) on Linux at the moment. > I understand its based on Qt4, and Qt4 is being dropped in favour of > Qt5. At the very least, check how long your distribution will be > supportin

[fpc-pascal] Reading resources

2015-07-19 Thread Juha Manninen
Lazarus examples folder has an application ResExplorer made by Alexey Lagunov. It does not work well, images and other resource contents are not shown. Only the resource name shows correctly. It uses FPC resource classes. How to use them properly? I am testing now with FPC trunk but 2.6.4 works the

Re: [fpc-pascal] FPC roadmap?

2015-06-11 Thread Juha Manninen
On Thu, Jun 11, 2015 at 5:33 PM, Michael Van Canneyt wrote: > After that (as in: as of monday) as far as I am concerned, RC1 may be built. That would be sooner than I expected. Cool! Thanks in advance. Juha ___ fpc-pascal maillist - fpc-pascal@lists.

Re: [fpc-pascal] FPC roadmap?

2015-06-11 Thread Juha Manninen
On Mon, Jun 1, 2015 at 12:17 AM, Jonas Maebe wrote: > I don't think much will still change to that branch before the release. Then please release ASAP. I have one sincere question: Will FPC 3.0 happen this year? Typically from RC1 it takes ~3-4 months to the release. Now we don't have even RC1 i

Re: [fpc-pascal] Release of Lazarus 1.4

2015-04-22 Thread Juha Manninen
On Wed, Apr 22, 2015 at 2:41 PM, Rainer Stratmann wrote: > Are there screenshots? Screenshots of some new features : http://wiki.freepascal.org/New_IDE_features_since#v1.4_.282015-04-22.29 > Is it with the new layout, one Window only? Anchordocking is not really "new" but it still does not wo

Re: [fpc-pascal] fpcup fails on Linux

2015-04-18 Thread Juha Manninen
Thanks for everybody for testing. I could finally install FPC trunk in my development machine, Mint Linux 64-bit, using fpcup. I remember it failed also there earlier for some reason. I still don't know what caused the errors in the fresh XUbuntu and other Linux distros in virtual machines. I hope

Re: [fpc-pascal] fpcup fails on Linux

2015-04-17 Thread Juha Manninen
On Fri, Apr 17, 2015 at 3:27 PM, Michael Van Canneyt wrote: > I did a small fix, added a dependency on rtl-objpas, where the variants unit > is located. > Rev 30618. > > Can you please test if this fixes the issue for you ? Using "trunk" now in the command. It looks different but still fails. I r

Re: [fpc-pascal] fpcup fails on Linux

2015-04-17 Thread Juha Manninen
I found a similar error from last December, experienced by Waldo Kitty : https://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg32256.html but there was no solution. Why it happens only with rstconv.pp? Many units were already compiled before that. My test system is a fresh XUbuntu, 32-b

[fpc-pascal] fpcup fails on Linux

2015-04-17 Thread Juha Manninen
I tried installing FPC using fpcup on some Linux systems, now on XUbuntu. Both "fixes" and "trunk" give an error with fpjson. On Windows I can install both without problems. Do I need another package from Ubuntu repos? Here "fixes" is set to branch fixes_3_0 : ./fpcup_linux_x86 --fpcURL="fixes" -

Re: [fpc-pascal] Using Cairo lib on Linux without X

2015-04-09 Thread Juha Manninen
FYI, I got ssh access to a Linux server and tested a program made with Lazarus CairoCancas with NoGui widgetset. The machine had Mint Linux and libcairo was installed. X11 was installed, too, but not running. "ldd" shows libcairo depends on X11. The program amazingly works! It builds a PDF file wi

Re: [fpc-pascal] Using Cairo lib on Linux without X

2015-04-08 Thread Juha Manninen
On Thu, Apr 9, 2015 at 1:26 AM, fredvs wrote: > Hum, from previous mail ;) => > > You may download src from => > => http://cairographics.org/releases/cairo-1.14.2.tar.xz > => unzip it. > => $ cd cairo-1.14.2 > => $ ./configure --disable-libX11 (or --disable-X11 ?) (or --enable-X11=no > ?) > => $ m

Re: [fpc-pascal] Using Cairo lib on Linux without X

2015-04-08 Thread Juha Manninen
On Wed, Apr 8, 2015 at 4:36 PM, fredvs wrote: > Yep, usually i use sudo apt-get build-dep xxx but it does not work any > more... I also have XUbuntu where I could run that command. It downloaded and installed many packages but I don't find the cairo source directory. Where is it? Juha __

Re: [fpc-pascal] Using Cairo lib on Linux without X

2015-04-08 Thread Juha Manninen
On Wed, Apr 8, 2015 at 1:21 AM, fredvs wrote: >> If you build the library from source, you can select >> various output streams during the configure script. > > => > > $ sudo apt-get build-dep cairo Interesting. That works in Ubuntu but not in Mint. They are more and more distinct. > $ cd cairo

Re: [fpc-pascal] Using Cairo lib on Linux without X

2015-04-08 Thread Juha Manninen
Thanks for answers everybody. On Tue, Apr 7, 2015 at 11:17 PM, Graeme Geldenhuys wrote: > Alternative for PDF generation, as I mentioned before to you I believe, > fpGUI includes a very good PDF report engine which could easily work > without depending on fpGUI or any GUI. Don't worry Graeme, I

[fpc-pascal] Using Cairo lib on Linux without X

2015-04-07 Thread Juha Manninen
FPC has the API wrapper for Cairo lib. I am studying its dependencies and maybe use it in a Linux server with no X Window installed, for generating PDFs. Cairo is advertized to support multiple output devices, including X Window, image buffers, PostScript, PDF, and SVG file output. I understand it

[fpc-pascal] Binary code generated for Integer and PtrInt

2015-01-02 Thread Juha Manninen
Does it make sense to use PtrInt instead of Integer for optimization or code size reasons? In other words, does the compiler generate faster or smaller code in 64-bit CPUs for the native integer size? Does it depend on architecture? Regards, Juha ___ fpc

Re: [fpc-pascal] fpcup: FPC trunk 64-bit for Windows

2014-09-30 Thread Juha Manninen
On Tue, Sep 30, 2014 at 4:01 PM, Reinier Olislagers wrote: > Run with fpgui and select the profile you want to run (a full build > seems best for the initial run) I did a new build with fpcup64.exe --fpcURL=trunk and it works very well. This is quite a big tool already. Lots of options and feat

[fpc-pascal] fpcup: FPC trunk 64-bit for Windows

2014-09-30 Thread Juha Manninen
I downloaded fpcup64.exe from https://bitbucket.org/reiniero/fpcup/downloads After installation everything works well, but the FPC version is 2.6.5. How to update it to FPC trunk? I need it for testing purposes. Regards, Juha ___ fpc-pascal maillist

Re: [fpc-pascal] Fast CRC functions?

2014-08-25 Thread Juha Manninen
Ok, thanks. This is yet another topic I should learn about. Tony, I don't believe pycrc can generate much faster functions than ours unless it uses SIMD. Our function works well but it is called so ofter that its speed is relevant. Mark, I promise to study the algorithms but changing our algorith

[fpc-pascal] Fast CRC functions?

2014-08-25 Thread Juha Manninen
We have an old function for calculating CRC like: function CalcCRC(const Str: String): Cardinal; var Len, i, CRCVal: Cardinal; Begin Len := Length(Str); CRCVal := $; if Len > 0 then for i := 1 to Len do CRCVal := CRCTbl[Byte(CRCVal xor Cardinal(Str[i]))] xor ((CRCVal shr

Re: [fpc-pascal] Setting execute bit for a Unix file

2014-07-31 Thread Juha Manninen
On Thu, Jul 31, 2014 at 11:26 PM, Karoly Balogh (Charlie/SGR) wrote: > Naaah, better use FpChmod() in BaseUnix unit: > http://www.freepascal.org/docs-html/rtl/baseunix/fpchmod.html Right, I was looking at page http://www.freepascal.org/docs-html/rtl/unix/index-5.html but did not notice this one

[fpc-pascal] Setting execute bit for a Unix file

2014-07-31 Thread Juha Manninen
Hello How can I set a file flag (execute) using Pascal code in a Linux system? Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC 2.7.1 snapshot for Win32

2014-07-29 Thread Juha Manninen
On Tue, Jul 29, 2014 at 6:07 PM, Sven Barth > Did you check that the paths inside the fpc.cfg are really the correct ones? Right. After all I missed the important parts of fpc.cfg. I had copied it from FPC under Lazarus installation dir. There the paths are C:\lazarus\fpc\$FPCVERSION. I don't know

[fpc-pascal] FPC 2.7.1 snapshot for Win32

2014-07-29 Thread Juha Manninen
How to test the compiled FPC snapshot binaries on Windows? I found a link from this page: http://www.freepascal.org/develop.var under header "Download Daily Update of Development Tree (trunk)" I think it should be "Download Daily Compiled Binaries of Development Tree (trunk)" but it is no big

[fpc-pascal] cthreads

2014-07-25 Thread Juha Manninen
I was asked why a threaded application compiles on Linux without "uses cthreads" but it does not work. cthreads must _always_ be added to uses section. I had no answer to that. IMO such errors should be trapped at compile-time, not at run-time. Could it be fixed somehow? Many people experience the

Re: [fpc-pascal] Illeagal assignment to For Loop variable in Free pascal

2014-06-18 Thread Juha Manninen
On Wed, Jun 18, 2014 at 2:36 PM, Bart wrote: > The original code removes trailing spaces only, and Trim() removes > more than spaces (and it removes leading blanks as well). Filename := TrimRight(Filename); :) Juha ___ fpc-pascal maillist - fpc-pa

Re: [fpc-pascal] Illeagal assignment to For Loop variable in Free pascal

2014-06-18 Thread Juha Manninen
On Wed, Jun 18, 2014 at 6:42 AM, Ralf Quint wrote: > A totally different solution and also more universal (not depending on the > length of the filename to be exactly 8 characters long would be > >while ((Length (Filename) > 0) AND (Filename (Length (Filename) = ' ') do >Delete (Filena

Re: [fpc-pascal] Canvas.TextStyle

2014-05-25 Thread Juha Manninen
Thanks. I will experiment with it. Regards Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Canvas.TextStyle

2014-05-24 Thread Juha Manninen
On Sat, May 24, 2014 at 2:26 PM, Sven Barth wrote: > http://wiki.freepascal.org/User_Changes_2.4.0#Treating_direct-mapped_properties_as_regular_fields Ok, then this becomes an LCL issue. How to port Delphi code like Canvas.TextFlags := Canvas.TextFlags or ETO_RTLREADING Canvas.TextFlags := Ca

[fpc-pascal] Canvas.TextStyle

2014-05-24 Thread Juha Manninen
Why can't I set members of TextStyle in TCanvas? For example : Canvas.TextStyle.RightToLeft := True; or Canvas.TextStyle.Layout := tlTop; give : Error: Argument can't be assigned to Canvas.TextStyle is a replacement for Delphi's Canvas.TextFlags, isn't it? ___

Re: [fpc-pascal] [Lazarus] Lazarus 1.2.2 Release

2014-04-24 Thread Juha Manninen
On Thursday, April 24, 2014, Reinier Olislagers wrote: > > Yes. I'd therefore suggest that if people really want to have a 64 bit > IDE, they should compile it themselves... (in other words, leave the > current situation as is as it is much less likely to cause problems for > newbies) > My feelin

Re: [fpc-pascal] minigzip example does not compile (?)

2014-04-01 Thread Juha Manninen
On Tue, Apr 1, 2014 at 1:53 PM, Marco van de Voort wrote: > Newer delphi's come with a zstream iirc, and contrary to D7(*), you don't need > to do anything. (unit zlib, tzcompressionstream and -de variant + helper > procedures). I use them for the png compression in my ported fcl-image parts. Yes

Re: [fpc-pascal] minigzip example does not compile (?)

2014-04-01 Thread Juha Manninen
BTW, does anybody know of a Delphi compatible version of this compression lib? The new Unicode Delphis do not need to be supported. What about some other similar Delphi compatible lib? Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

Re: [fpc-pascal] minigzip example does not compile (?)

2014-04-01 Thread Juha Manninen
On Tue, Apr 1, 2014 at 11:09 AM, Juha Manninen wrote: > Got "LongInt" expected "SmallInt" I opened the example program in Lazarus for debugging it. Lazarus project uses mode objfpc by default. Changing 2 variables from Integer to SmalInt solved the compilation problem.

Re: [fpc-pascal] minigzip example does not compile (?)

2014-04-01 Thread Juha Manninen
Another note about paszlib sources. There is a spelling mistake in the header comment which is copied to every source file: "Pascal tranlastion" Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman

[fpc-pascal] minigzip example does not compile (?)

2014-04-01 Thread Juha Manninen
I also have a gzip related issue. I try to test with paszlib/examples/minigzip but the compiler gives : minigzip.pas(73,40) Error: Call by var for arg no. 2 has to match exactly: Got "LongInt" expected "SmallInt" FPC 2.6.4 and FPC trunk seem to have identical code here. It is possible I do somet

Re: [fpc-pascal] THandle in code that must compile also with Delphi

2014-03-20 Thread Juha Manninen
On Thu, Mar 20, 2014 at 3:25 PM, Virgo Pärna wrote: > I did try googling and it appears, that in 64 bit Delphi XE2 uses THandle > as a result type. Anyway, in the case of error, it returns > INVALID_HANDLE_VALUE, > which is DWORD(-1). >So, under Windows it would be possible to use same co

[fpc-pascal] THandle in code that must compile also with Delphi

2014-03-20 Thread Juha Manninen
FileCreate and FileOpen return THandle with FPC but integer with Delphi2007. Delphi defines THandle as LongWord but for some reason Integer is used instead. With FPC on a 64-bit system THandle is 64- bit unsigned. Question: what is the best way to maintain code that must compile with both FPC and

Re: [fpc-pascal] How to know the string type of a variable?

2013-12-30 Thread Juha Manninen
On Mon, Dec 30, 2013 at 9:17 PM, Mattias Gaertner wrote: > if FindInvalidUTF8Character(PChar(Pointer(s)),length(s))<0 then > // UTF-8 Uhhh! I will be totally screwed when I must do a unicode conversion myself. What was this "PChar(Pointer(s))" again? PChar is a pointer, why does it need a doubl

Re: [fpc-pascal] How to know the string type of a variable?

2013-12-30 Thread Juha Manninen
On Mon, Dec 30, 2013 at 2:35 PM, Marcos Douglas wrote: > Is possible to know what string type of a variable (AnsiString, > UTF8String, RawByteString, etc)? When UTF-8 encoded string is stored in AnsiString (as in LCL), this test should tell you if it actually is UTF-8 string: if Length(s) <> UT

[fpc-pascal] FastMM for FPC?

2013-11-25 Thread Juha Manninen
Hello We found an old link from 2005 about a FastMM port : http://free-pascal-general.1045716.n5.nabble.com/First-Test-of-FastMM4-for-fpc-td2809801.html Is it still alive? Is there a version that works with recent FPCs? Support for Win32 would be enough obviously. We are comparing different memo

Re: [fpc-pascal] Re: Cross Compile : treefilteredit.pas(60, 60) Error: Illegal expression

2013-11-24 Thread Juha Manninen
On Sun, Nov 24, 2013 at 1:00 PM, Osvaldo Filho wrote: > TBranchList = specialize TFPGObjectList; // line 60 The syntax is perfectly valid and compiles fine here with FPC 2.6.2. Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://l

Re: [fpc-pascal] CompareMem documentation

2013-11-14 Thread Juha Manninen
On Thu, Nov 14, 2013 at 9:42 PM, Vincent Snijders wrote: > Those docs are outdated: see up to date docs at: > http://www.freepascal.org/docs-html/rtl/sysutils/comparemem.html Ok, thanks. Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] CompareMem documentation

2013-11-14 Thread Juha Manninen
Documentation here: http://lazarus-ccr.sourceforge.net/docs/rtl/sysutils/comparemem.html says that the function returns <0, 0 or >0 while actually it returns a Boolean. Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.free

Re: [fpc-pascal] Powtils: lightwebserver, lightwebserver2 or lightwebserver3?

2013-11-01 Thread Juha Manninen
On Fri, Nov 1, 2013 at 6:53 PM, silvioprog wrote: > Once I did a test and fphttpserver responded to 2000 requests per second. ;) The speed depends on page contents, too, but anyway that sounds very fast. Juha ___ fpc-pascal maillist - fpc-pascal@list

Re: [fpc-pascal] Powtils: lightwebserver, lightwebserver2 or lightwebserver3?

2013-10-31 Thread Juha Manninen
On Mon, Oct 28, 2013 at 3:22 PM, Graeme Geldenhuys wrote: > Having recently (and currently still) doing extensive work with embedded > HTTP servers, I tested many (Powtils, Indy, tiWebServer, FPC, nYume etc). I > must agree with Michael, fphttpserver is a good choice. There is a bit of a > learnin

Re: [fpc-pascal] fcl-process, SimpleIPC and pipes

2013-10-08 Thread Juha Manninen
Thanks Michael and Mark for informative answers. Juha ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] fcl-process, SimpleIPC and pipes

2013-10-08 Thread Juha Manninen
I must implement communication between 2 processes. I believe SimpleIPC is good for that purpose and it is well tested in a cross-platform system (Lazarus <-> ChmHelp). Named pipes were suggested to me. I would like to know the benefits / handicaps of SimpleIPC compared to named pipes. I will have

Re: [fpc-pascal] Sets

2013-10-02 Thread Juha Manninen
On Thu, Oct 3, 2013 at 1:58 AM, Jonas Maebe wrote: > It is part of {$mode delphi}: > http://wiki.freepascal.org/User_Changes_2.6.0#Sizes_of_sets_in_TP.2FDelphi_mode Ok, sorry Marco and Jonas. This unit did not have Mode Delphi. I thought the setting in a Lazarus project was enough but no. This un

Re: [fpc-pascal] Sets

2013-10-02 Thread Juha Manninen
On Wed, Oct 2, 2013 at 10:50 PM, Sven Barth wrote: > And as Peter already mentioned there is $PACKSET: > http://freepascal.org/docs-html/prog/progsu61.html#x67-660001.1.61 Ok, {$PACKSET 1} helps. I expected it to be part of {$Mode Delphi}. Most things are Delphi compatible with it. Thanks. Juha

[fpc-pascal] Sets

2013-10-02 Thread Juha Manninen
If I have have a set with < 9 elements, like : type TMyEnum = ( xOne, xTwo, xThree, xFour, xFive ); // Count <= 8, fits in one Byte TMyEnums = set of TMyEnum; then in Delphi a variable of that type can be casted to Byte. Other casts don't work. In FPC I must cast it to

Re: [fpc-pascal] Nested comments

2013-09-23 Thread Juha Manninen
On Mon, Sep 23, 2013 at 3:06 PM, Michael Van Canneyt wrote: > Use Delphi mode or TP mode. Thanks, it helped. Actually there already was {$MODE Delphi} in an include file. Apparently it does not work, it must be in every pascal unit. This PDF package still does not compile with Lazarus. I will se

  1   2   3   >