Re: [fpc-pascal] best method: multiple three state options in a decision tree

2014-01-21 Thread waldo kitty
On 1/18/2014 7:40 PM, waldo kitty wrote: what is the best method of coding a decision tree with options that have three states and all options are additive? clarification: i have a situation with 5 (at this time) options and all 5 are three state... each option can be paired with all other opti

Re: [fpc-pascal] best method: multiple three state options in a decision tree

2014-01-21 Thread Mattias Gaertner
On Tue, 21 Jan 2014 09:51:38 -0500 waldo kitty wrote: > On 1/18/2014 7:40 PM, waldo kitty wrote: > > > > what is the best method of coding a decision tree with options that have > > three > > states and all options are additive? > > > > clarification: i have a situation with 5 (at this time) opt

[fpc-pascal] Strange message about mixed signed expression

2014-01-21 Thread Jürgen Hestermann
I always wondered why I get a compiler message for the following code snipped: function Match(M,F : UTF8String) : boolean; var i : Cardinal; ... if i+length(M)___ fpc-pascal

Re: [fpc-pascal] Strange message about mixed signed expression

2014-01-21 Thread Howard Page-Clark
On 21/01/2014 17:33, Jürgen Hestermann wrote: I always wondered why I get a compiler message for the following code ... if i+length(M) Length is declared in the compiler/RTL to return an integer result. Howard ___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] Strange message about mixed signed expression

2014-01-21 Thread Jürgen Hestermann
Am 2014-01-21 18:43, schrieb Howard Page-Clark: On 21/01/2014 17:33, Jürgen Hestermann wrote: I always wondered why I get a compiler message for the following code ... if i+length(M) Length is declared in the compiler/RTL to return an integer result. Realy? But why that? It cannot be negati

Re: [fpc-pascal] best method: multiple three state options in a decision tree

2014-01-21 Thread waldo kitty
On 1/21/2014 10:21 AM, Mattias Gaertner wrote: On Tue, 21 Jan 2014 09:51:38 -0500 waldo kitty wrote: On 1/18/2014 7:40 PM, waldo kitty wrote: what is the best method of coding a decision tree with options that have three states and all options are additive? clarification: i have a situation

Re: [fpc-pascal] Can Delphi load a small function of a shared lib written in Free Pascal 2.6.2?

2014-01-21 Thread silvioprog
2014/1/17 hinst > I suggest you use COM interfaces to use FPC objects from Delphi code. > While FPC class instance memory layout differs from Delphi class instance > memory layout, COM interface instances should have identical memory > layouts; so they should be accessible from Delphi code Than

[fpc-pascal] Adding files to a tar file

2014-01-21 Thread luciano de souza
Hello all, This code should add all the files of a directory in a tar file. program e01; {$mode objfpc}{$H+} uses libtar, sysutils; var archive: TTarWriter; search: TSearchRec; BEGIN archive := TTarWriter.create('arquivo.tar'); with archive do begin try FindFirst('/home/luciano/Documentos/*',

Re: [fpc-pascal] Adding files to a tar file

2014-01-21 Thread Flávio Etrusco
On Tue, Jan 21, 2014 at 10:45 PM, luciano de souza wrote: > Hello all, > > This code should add all the files of a directory in a tar file. > > program e01; > {$mode objfpc}{$H+} > > uses > libtar, sysutils; > > var > archive: TTarWriter; > search: TSearchRec; > > BEGIN > archive := TTarWriter.cre

Re: [fpc-pascal] Adding files to a tar file

2014-01-21 Thread luciano de souza
Yes, that's the mistake. I forgot the fact "search.name" does not returns a full path. This code works very well. program e01; {$mode objfpc}{$H+} uses libtar, sysutils; var archive: TTarWriter; search: TSearchRec; path: string; BEGIN archive := TTarWriter.create('arquivo.tar'); with archive do

Re: [fpc-pascal] Adding files to a tar file

2014-01-21 Thread waldo kitty
On 1/21/2014 7:45 PM, luciano de souza wrote: The program compiles, but I got an error. The message says that the first file of the directory can't be opened. What is wrong? your code uses faAnyfile... perhaps you need to be more restrictive? is your problem caused by a sub-directory with the

Re: [fpc-pascal] Strange message about mixed signed expression

2014-01-21 Thread leledumbo
Jürgen Hestermann wrote > Realy? > But why that? > It cannot be negative. > Using integer instead of unsigned values reduces the possible (positive) > range > and produces such illogical (to me) compiler warnings. Delphi compatibility and maximum data size limitation AFAIK (2 GB). -- View this