Re: [fpc-pascal] Real length of WideString

2010-10-20 Thread Graeme Geldenhuys
Op 2010-10-21 08:29, Graeme Geldenhuys het geskryf: > > Length() returns number of bytes, not number of characters. The incorrect > assumption was made back in Delphi (before unicode support). >From Delphi 7 & Kylix 3 help: "For single-byte and multibyte strings, Length returns the number of byt

Re: [fpc-pascal] Real length of WideString

2010-10-20 Thread Graeme Geldenhuys
Op 2010-10-21 08:17, Felipe Monteiro de Carvalho het geskryf: > On Thu, Oct 21, 2010 at 1:41 AM, Zaher Dirkey wrote: >> How to get the real length of WideString variable. > > Length in which unit? WideChars (2 bytes each) or Bytes? > > Length() returns the amount of WideChars AFAIK > Length()

Re: [fpc-pascal] Building FPC with debug information

2010-10-20 Thread Graeme Geldenhuys
Op 2010-10-20 20:36, Jonas Maebe het geskryf: > > On 20 Oct 2010, at 19:54, Brian Winfrey wrote: > >>> make OPT="-O-" DEBUG=1 all >> >> When I ran this I see that both -dDEBUG and -dRELEASE are passed on >> the fpc command line. Is that correct? > > Yes. Mind explaining why? DEBUG and RELEASE

Re: [fpc-pascal] Real length of WideString

2010-10-20 Thread Felipe Monteiro de Carvalho
On Thu, Oct 21, 2010 at 1:41 AM, Zaher Dirkey wrote: > How to get the real length of WideString variable. Length in which unit? WideChars (2 bytes each) or Bytes? Length() returns the amount of WideChars AFAIK -- Felipe Monteiro de Carvalho ___ fpc-p

Re: [fpc-pascal] Re: Real length of WideString

2010-10-20 Thread Felipe Monteiro de Carvalho
On Thu, Oct 21, 2010 at 2:28 AM, Zaher Dirkey wrote: > var >   ws: widestring; > begin >   ws:= 'زاهر'; >   Label3.Caption := inttostr(length(ws)); > //= 8 Here the compiler assumes that your source code is encoded in the default system encoding and then it converts your string to utf-16. Probabl

[fpc-pascal] Re: Real length of WideString

2010-10-20 Thread Zaher Dirkey
On Thu, Oct 21, 2010 at 1:41 AM, Zaher Dirkey wrote: > How to get the real length of WideString variable. > > Hmm, I think i found my problem but not understand it, i used Lazarus as editor to write the code var ws: widestring; begin ws:= 'زاهر'; Label3.Caption := inttostr(length(ws)); //=

[fpc-pascal] Real length of WideString

2010-10-20 Thread Zaher Dirkey
How to get the real length of WideString variable. Thanks in advance. -- Zaher Dirkey ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Building FPC with debug information

2010-10-20 Thread Jonas Maebe
On 20 Oct 2010, at 19:54, Brian Winfrey wrote: >> make OPT="-O-" DEBUG=1 all > > When I ran this I see that both -dDEBUG and -dRELEASE are passed on > the fpc command line. Is that correct? Yes. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.fr

Re: [fpc-pascal] Building FPC with debug information

2010-10-20 Thread Andrew Brunner
Yes. It's what I saw. I was still able to trace database components line by line using Lazarus and GDB though. On Wed, Oct 20, 2010 at 12:54 PM, Brian Winfrey wrote: >> make OPT="-O-" DEBUG=1 all > > When I ran this I see that both -dDEBUG and -dRELEASE are passed on > the fpc command line.  Is

Re: [fpc-pascal] Building FPC with debug information

2010-10-20 Thread Brian Winfrey
> make OPT="-O-" DEBUG=1 all When I ran this I see that both -dDEBUG and -dRELEASE are passed on the fpc command line. Is that correct? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Can variables be declared within a block?

2010-10-20 Thread Reimar Grabowski
On Tue, 19 Oct 2010 21:18:03 +0100 Vannus wrote: > your example is at the start of a "for loop" block, which is much the same > as having it at the start of a procedure block So much the same that you can do it in pascal? What about variables declared inside this for loop or inside the else block

Re: [fpc-pascal] Locate method in TBuFDataset

2010-10-20 Thread Michael Van Canneyt
On Wed, 20 Oct 2010, John wrote: Hi all, Does anyone know if TBuFDataset.Locate honours the TLocateOptions parameter passed to it ?  It certainly doesn't *seem* to work. I am actually using a TSQLQuery against an SQLite3 database, Laz 0.9.28.2, fpc 2.2.4, Win32.  I should say that I am pr