Re: [fpc-pascal] cross platform version of IsCharAlpha()

2009-01-12 Thread ik
The problem with such function is that it requires a lot of data to be used on a non ANSI table. and you can not use in a unicode implementation the Char type, because a char can be more then one byte. Ido On Mon, Jan 12, 2009 at 11:09 AM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: Hi,

Re: [fpc-pascal] cross platform version of IsCharAlpha()

2009-01-12 Thread Graeme Geldenhuys
On Mon, Jan 12, 2009 at 11:13 AM, ik ido...@gmail.com wrote: The problem with such function is that it requires a lot of data to be used on a non ANSI table. and you can not use in a unicode implementation the Char type, because a char can be more then one byte. I know that all to well. :-)

Re: [fpc-pascal] cross platform version of IsCharAlpha()

2009-01-12 Thread ik
Because it depends on the code page of the system you are using at the moment you parse the char. On Mon, Jan 12, 2009 at 11:19 AM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: On Mon, Jan 12, 2009 at 11:13 AM, ik ido...@gmail.com wrote: The problem with such function is that it requires

Re: [fpc-pascal] cross platform version of IsCharAlpha()

2009-01-12 Thread Florian Klaempfl
Graeme Geldenhuys schrieb: Hi, IsCharAlpha() is a Win32 API call. I'm trying to convert code that uses that call, to be Windows and Linux compatible. Does FPC have a cross-platform version of that API call? I did a text search through the RTL of v2.2.3 and it only seems to have the

Re: [fpc-pascal] Saving user created component structure to LFM file

2009-01-12 Thread Martin Friebe
Hi, I may have found a way top solve my problem (saving a list of components from various places, not necesarely all nested in the top level component / See below) The question now is, how forward-compatible is this ode. How much do I have to expect any of the current code to change in ways

Re: [fpc-pascal] Suggestions for fpspreadsheet

2009-01-12 Thread Felipe Monteiro de Carvalho
On Sun, Jan 11, 2009 at 2:32 PM, Boris Samorodov b...@ipt.ru wrote: * Add support to also read Excel 5 files I'd vote for this one twice if possible. ;-) As for the others they are interesting but not very important for me. I went for this one. Excel 2.1 reading works nicely. It also reads

[fpc-pascal] How to allocate a 2D array?

2009-01-12 Thread Arjan van Dijk
Hi! In my code I often use 2D arrays. Until today, I kept the maximum dimension fixed to 400 * 300 points. How can I make allocatable columns of ARBITRARY size? For simplicity here a 1D reduction of the problem: This is what I have: CONST MaxN = 400; TYPE ColumnType = ARRAY[1..MaxN] OF

Re: [fpc-pascal] How to allocate a 2D array?

2009-01-12 Thread Ivo Steinmann
you can try var YourArray, Row: PFloat; Width: Integer; Height: Integer; // alloc array GetMem(YourArray, Width*Height*Sizeof(Float)); // access point (X, Y), while X in [0,Width-1] and Y in [Y, Height-1] YourArray[X + Y*Width] := ... // access row (Y) Row := @YourArray[Y*Width]; Row[X] :=

[fpc-pascal] SQL show tables

2009-01-12 Thread David B Copeland
Hi, I am trying to pre-fill a TComboBox with the all the tables in a database, without sucess. I am running Suse 10.3, a recent (within a week) Lazarus 0.9.27 from svn, FPC 2.2.2, 64-bit. The program uses a ODBCConnection to a MySQL database. The code I tried is: FormMyDB.Query.SQL.Clear;

Re: [fpc-pascal] SQL show tables

2009-01-12 Thread ABorka
I think execsql never returns any records, you supposed to use open for queries returning results. Execsql is for insert, delete, update, etc. David B Copeland wrote: Hi, I am trying to pre-fill a TComboBox with the all the tables in a database, without sucess. I am running Suse 10.3, a

Re: [fpc-pascal] How to allocate a 2D array?

2009-01-12 Thread Jilani Khaldi
Arjan van Dijk wrote: Hi! In my code I often use 2D arrays. Until today, I kept the maximum dimension fixed to 400 * 300 points. How can I make allocatable columns of ARBITRARY size? For simplicity here a 1D reduction of the problem: This is what I have: CONST MaxN = 400; TYPE ColumnType

Re: [fpc-pascal] SQL show tables

2009-01-12 Thread David B Copeland
Ah yes, you are correct. However the the Open returns the following error: Query: Cannot open a non-select statement I also have found some more help in the Lazarus wiki which just happens to have an example of how to do a show tables. So then, I tried the following: FormMyDB.Query.SQL.Clear;

[fpc-pascal] Re: Library Project raises Linker Error Hints at -fPIC option

2009-01-12 Thread Andrew Brunner
I'm still unable to build my libraries. Can I get anyone to help? :-) On Tue, Jan 6, 2009 at 8:46 PM, Andrew Brunner andrew.t.brun...@gmail.com wrote: I'm looking for a reason why I get this error while linking a compile of a Shared Object I'm building under x64 (Ubuntu). BinUtils 2.19