Re: [fpc-pascal] libQT4Pas - Why it is needed?

2012-02-01 Thread zeljko
On Wednesday 01 of February 2012 21:02:38 Vladimir Zhirov wrote: > > Do other languages like python use the plain c interface, or > > C++? > > how about something like ruby, lua, objective C, php .. > > AFAIK, Lua uses automatically generated plain C binding. > When I looked at it, the binding gen

Re: [fpc-pascal] TStringStream.DataString returns garbage?

2012-02-01 Thread Lars
Graeme Geldenhuys wrote: > On 2 February 2012 00:14, Michael Van Canneyt wrote: >> >> Ehm.. this should be S[1], now you're writing the pointer. > > > Thank you. That's what happens if you have too many very late nights > programming - sleep deprivation catches up and one overlooks the > simple mi

Re: [fpc-pascal] TStringStream.DataString returns garbage?

2012-02-01 Thread Graeme Geldenhuys
On 2 February 2012 00:14, Michael Van Canneyt wrote: > > Ehm.. this should be S[1], now you're writing the pointer. Thank you. That's what happens if you have too many very late nights programming - sleep deprivation catches up and one overlooks the simple mistakes. -- Regards,   - Graeme -

Re: [fpc-pascal] TStringStream.DataString returns garbage?

2012-02-01 Thread Graeme Geldenhuys
Thanks Mattias for replying so quickly. On 2 February 2012 00:10, Mattias Gaertner wrote: >> var >>   srcstream: TStringStream; >>   s, f: string; > > I guess string is an ansistring? Yes. > if s<>'' then // this if is not needed in this case >  srcstream.Write(s[1], Length(s)) Argh, rooki

Re: [fpc-pascal] replace one field of a record in a collection...

2012-02-01 Thread Sven Barth
Am 01.02.2012 21:21 schrieb "waldo kitty" : > > > i've gone brain dead after a few days at my $$$ job and i cannot figure out how to replace one field of a record in a collection :/ i'm looking at my existing code that does something similar but it is replacing the entire record and that's too muc

Re: [fpc-pascal] TStringStream.DataString returns garbage?

2012-02-01 Thread Michael Van Canneyt
On Thu, 2 Feb 2012, Graeme Geldenhuys wrote: Hi, What am I doing wrong in the following code? It always fails on test number 2. The DataString property is returning garbage, and not the value equal to the 'Graeme Geldenhuys' string. -- var srcstr

Re: [fpc-pascal] TStringStream.DataString returns garbage?

2012-02-01 Thread Mattias Gaertner
On Thu, 2 Feb 2012 00:03:15 +0200 Graeme Geldenhuys wrote: > Hi, > > What am I doing wrong in the following code? It always fails on test > number 2. The DataString property is returning garbage, and not the > value equal to the 'Graeme Geldenhuys' string. > > > ---

[fpc-pascal] TStringStream.DataString returns garbage?

2012-02-01 Thread Graeme Geldenhuys
Hi, What am I doing wrong in the following code? It always fails on test number 2. The DataString property is returning garbage, and not the value equal to the 'Graeme Geldenhuys' string. -- var srcstream: TStringStream; s, f: string; i: integer;

[fpc-pascal] replace one field of a record in a collection...

2012-02-01 Thread waldo kitty
i've gone brain dead after a few days at my $$$ job and i cannot figure out how to replace one field of a record in a collection :/ i'm looking at my existing code that does something similar but it is replacing the entire record and that's too much as well as the fact that the two records i'

Re: [fpc-pascal] libQT4Pas - Why it is needed?

2012-02-01 Thread Vladimir Zhirov
> Do other languages like python use the plain c interface, or > C++? > how about something like ruby, lua, objective C, php .. AFAIK, Lua uses automatically generated plain C binding. When I looked at it, the binding generator consisted of the following parts: 1) A C++-based program to parse C++

[fpc-pascal] lNet and TCP packet length

2012-02-01 Thread Malcolm Poole
I'm working on a client/server project which involves sending SQL commands from server to client and vice versa. I've been using the LTCP component for both the client and the server, which have been working perfectly during testing on the same machine and between different virtual machines, s

Re: [fpc-pascal] FormatDatetime is not respecting the specified pattern

2012-02-01 Thread Luciano de Souza
Oh! Very well! I am blind, for me, slashes and backslashes are only words spoken by the screen reader. The worst is I listen "barra" and "barra invertida", the portuguese correspondent words. You can imagine: I don't see slashes and I listen differently. The chance of mistake is very high! But

Re: [fpc-pascal] FormatDatetime is not respecting the specified pattern

2012-02-01 Thread Luciano de Souza
Oh! Your correction is really good and welcome. Becouse of a Leber Congenital Amaurosis, I became blind when I was a child. As a consequence, nowadays, for me, slashes and backslashes are only a word spoken by the screen reader. It's really curious how brains can work differrently. When peopl

Re: [fpc-pascal] FormatDatetime is not respecting the specified pattern

2012-02-01 Thread silvioprog
2012/2/1 Michael Van Canneyt : > On Wed, 1 Feb 2012, Luciano de Souza wrote: >>     Hello listers, >> >>  A strange error came up when formating a date. See this code: >> writeln(formatdatetime('dd/mm/', now)); >> The answer should be: 31/01/2012 >> The answer was: 31-01-2012 >> I did one test