Re: [fpc-pascal] fpc-pascal Digest, Vol 175, Issue 31

2019-01-24 Thread MARCOU Gilles
Hi, I am not sure that I can help, but this is an interesting topic and I am curious if you find a solution. I can only assume that maybe you did not link to gcc and c libraries. Inside Common.pas, you should try to add {$link c} and {$link gcc}. You may check also that the symbol of your

Re: [fpc-pascal] Array clearing

2017-04-13 Thread MARCOU Gilles
Regarding this code: > SetLength(Array,Length(Array)+1); > Array[High(Array)] := … as I understood from (http://wiki.freepascal.org/Dynamic_array ), SetLength will create a copy of the array and free the memory of the shorter array. In this case, a lot

Re: [fpc-pascal] AnsiCompareStr question (again...)

2016-03-08 Thread MARCOU Gilles
Sorry for my last post, I missed some reply. I think that I understood now the problem. Using TStringList.Sort, it uses AnsiCompareStr which needs a specific widestring manager to be defined. This is done adding the unit cwstring in the program unit (the .lpr using Lazarus). A better option, if

Re: [fpc-pascal] AnsiCompareStr question (again...)

2016-03-07 Thread Marcou Gilles
Thanks for your answer Jonas. > One probably includes cwstring, while the other one doesn't. > AnsiCompareStr can be intercepted/replaced by widestring manages such as > cwstring. Is it what is meant into the manual by: "A widestring manager must be installed in order for this function to work

Re: [fpc-pascal] AnsiCompareStr question (again...)

2016-03-05 Thread Marcou Gilles
in a more simple context, I'll post a bug report. Thanks again for your help, Gilles Marcou Le samedi 05 mars 2016 à 13:01 +0100, Bart a écrit : > On 3/5/16, Marcou Gilles <g.mar...@unistra.fr> wrote: > > > > I checked the AnsiCompareStr value between these two string and found &

[fpc-pascal] AnsiCompareStr question (again...)

2016-03-05 Thread Marcou Gilles
Hi, in an application, I use a TStringList.Sort to sort a list of these two words "(C-C)" and "(C=C)". When I use the same unit in another project, the Sort function sort those two strings in revert order (on the same computer, same system). I checked the AnsiCompareStr value between these two