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

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 wkitt...@windstream.net 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

[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)length(F) then ...

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(F) then ... But where are signed expressions involved? Length is declared in the compiler/RTL to return an integer result. Howard

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(F) then ... But where are signed expressions involved? Length is declared in the compiler/RTL to

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 wkitt...@windstream.net 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?

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 hinsta...@yandex.ru 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

[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 luchya...@gmail.com 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 :=

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

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