Hello,
I have a text in the WideString variable. I want to send this text to a
SAPI5 synthesizer. I am doing this as follows:
WideStr := Format('%s', [Pitch, Text]);
Pitch is integer, Text is WideString.
The result is incorrect, only a half of the Text contents is copied to
the result.
Tested
Hello:
I use fpc 2.6.4 and I have a problem of memory leaks, strange errors,
etc. Finally I have tracked it to this:
TSimpleArrayString=object
List:array of String;
end;
TDerivedArrayString=object(TSimpleArrayString)
other_field:integer;
end;
procedure TestSimple;
var
A:TSimpleArrayStri
Lubos Pintes wrote:
Hello,
I have a text in the WideString variable. I want to send this text to a
SAPI5 synthesizer. I am doing this as follows:
WideStr := Format('%s', [Pitch, Text]);
Pitch is integer, Text is WideString.
The result is incorrect, only a half of the Text contents is copied to
Hello Mark,
The result isthe same, I tried it before I wrote my message.
I even tried to temporarily write ordinal codes of characters, it seems
that a string is not automatically converted to a WideString when
assigned, there wereno zeros, like H#0e#0l#0, etc.
Dňa 23. 12. 2015 o 11:07 Mark Mo
On Wed, 23 Dec 2015, Lubos Pintes wrote:
Hello Mark,
The result isthe same, I tried it before I wrote my message.
I even tried to temporarily write ordinal codes of characters, it seems
that a string is not automatically converted to a WideString when
assigned, there wereno zeros, like H#0e#
Santiago Amposta wrote:
Hello:
I use fpc 2.6.4 and I have a problem of memory leaks, strange errors,
etc. Finally I have tracked it to this:
TSimpleArrayString=object
List:array of String;
end;
TDerivedArrayString=object(TSimpleArrayString)
other_field:integer;
end;
procedure TestS
El 23/12/2015 a las 12:13, Dennis Poon escribió:
>
>
> Santiago Amposta wrote:
>> Hello:
>> I use fpc 2.6.4 and I have a problem of memory leaks, strange errors,
>> etc. Finally I have tracked it to this:
>>
>> TSimpleArrayString=object
>> List:array of String;
>> end;
>>
>> TDerivedArrayStrin
On 23/12/2015 11:40, Santiago A. wrote:
It's an object, not a class inherited from Tobject, so it hasn't create
constructor.
Try this:
program simpleObjConsole;
type
{ TSimpleArrayString }
TSimpleArrayString=object
public
List:array of String;
constructor Init;
destructo
I tried it now, and it doesn't work.
I also tried all string variables changed to WideString.
Dňa 23. 12. 2015 o 11:59 Michael Van Canneyt napísal(a):
On Wed, 23 Dec 2015, Lubos Pintes wrote:
Hello Mark,
The result isthe same, I tried it before I wrote my message.
I even tried to temporarily
On Wed, 23 Dec 2015, Lubos Pintes wrote:
I tried it now, and it doesn't work.
I also tried all string variables changed to WideString.
In that case, please file a bugreport with an example console program for
FPC.
Michael.
y
___
fpc-pascal maillis
On Wed, December 23, 2015 11:41, Lubos Pintes wrote:
Hello Lubos,
> The result isthe same, I tried it before I wrote my message.
> I even tried to temporarily write ordinal codes of characters, it seems
> that a string is not automatically converted to a WideString when
> assigned, there wereno
On 23/12/15 09:37, Santiago Amposta wrote:
> Hello:
> I use fpc 2.6.4 and I have a problem of memory leaks, strange errors,
> etc. Finally I have tracked it to this:
>
> TSimpleArrayString=object
> List:array of String;
> end;
>
> TDerivedArrayString=object(TSimpleArrayString)
> other_fie
Santiago A. wrote:
El 23/12/2015 a las 12:13, Dennis Poon escribió:
Did you call A.Create before calling TestDerived? Maybe A.List was not
initialized (which is done in constructor Create) and contains an
invalid pointer (to dynamic array of string).
When you call SetLength, it decrements the
El 23/12/2015 a las 16:24, Lukasz Sokol escribió:
> On 23/12/15 09:37, Santiago Amposta wrote:
> I might be wrong... but I just tried:
>
> ...
What's the conclusion? As far as I see, there is some kind of bug.
There is no reason for getting different results depending on how you
execute two
El 23/12/2015 a las 16:49, Dennis Poon escribió:
>
>
> Even if it is an object, you can still define a constructor.
> A constructor should initialize the memory area of the object to 0,
> even if you don't explicitly assign List := nil;
> It is safer to call this constructor before you handle the L
Lubos Pintes wrote:
Hello Mark,The result isthe same, I tried it before I wrote my message.I
even tried to temporarily write ordinal codes of characters, it seems
that a string is not automatically converted to a WideString when
assigned, there wereno zeros, like H#0e#0l#0, etc.
Dňa 23. 12. 201
I think for both Record or Object, you need to initialize any dynamic
array or strings fields before using them.
If you don't use any constructor , you need to initialize the fields
yourself.
Being an object, just gives you the added automatic zeroing of its
content. Advanced Record does not
On Wed, Dec 23, 2015 at 6:35 AM, Lubos Pintes
wrote:
> Hello,
> I have a text in the WideString variable. I want to send this text to a
> SAPI5 synthesizer. I am doing this as follows:
> WideStr := Format('%s', [Pitch, Text]);
[...]
Assuming that you tested it on Windows, you can't copy a Ansi
On 23/12/15 16:06, Santiago A. wrote:
> El 23/12/2015 a las 16:24, Lukasz Sokol escribió:
>> On 23/12/15 09:37, Santiago Amposta wrote:
>> I might be wrong... but I just tried:
>>
>> ...
>
> What's the conclusion? As far as I see, there is some kind of bug.
>
> There is no reason for getting
Santiago Amposta wrote:
I use fpc 2.6.4 and I have a problem of memory leaks, strange errors,
etc. Finally I have tracked it to this:
TSimpleArrayString=object
List:array of String;
end;
TDerivedArrayString=object(TSimpleArrayString)
other_field:integer;
end;
procedure TestSimple;
v
El 23/12/2015 a las 18:24, Jonas Maebe escribió:
> Santiago Amposta wrote:
>
>
> This is a bug in FPC 2.6.4 (it did not initialise managed fields of
> parent objects for child objects that do not declare extra managed
> fields). It is fixed in FPC 3.0.
>
I have used constructors as a workaround no
Santiago A. wrote:
In TDerivedArrayString I need to manually set the length of the list to
zero. If I don't, the memory is not freed, but in TSimpleArrayString it
frees memory.
Is it also a known bug of 2.6.4?
Yes, it was fixed at the same time IIRC.
Jonas
___
I’m trying to learn some basics of Windows and porting some OpenGL code. The
first step is getting an OpenGL context prepared but I’m already stuck here.
1) GLUT is long dead it looks like and I probably shouldn’t be using it since
there’s no official .dll available except from dodgy looking dow
I recommend SDL 2.0.
https://www.libsdl.org/download-2.0.php
I have a complete pascal source code declaration of it here:
http://github.com/sysrpl/Bare.Game/blob/master/source/bare.interop.sdl2.pas
I also have an object orient wrapper if you want to get straight into
OpenGL:
immediate mode cu
> There is a FreeGLUT package which it looks like FPC supports and I was able
to find the units and download a recent .dll but it complains about missing
symbols unless I add the glut unit which then attempts to load the
glut32.dll and fails
FreeGLUT is a drop-in replacement for GLUT (well, minus
25 matches
Mail list logo