On 04/06/2014 21:57, md-azbm7jvthboamjb+lgu...@public.gmane.org wrote:
> Where would something that is not a specific Pascal source code but a
> important reference project actually go?
>
> The code is not polished, nor can I stop what I am doing right now to
> get it polished for the public. But
Hello,
I'm trying to convert 'curr > str' and 'str to curr' respectively, but I've
got a problem with StrToCurrDef(). See my test below:
var
s: string;
c: Currency;
begin
c := 150.49;
s := CurrToStrF(c, ffCurrency, 2);
ShowMessage('OK: ' + s); // shows R$ 150,49
c := StrToCurrDef('R$
It will never throw an exception, but it will never be thread safe either.
Unless you are using the Interlocked* functions no datatype is
threadsafe on a modern processor(except for reference counting of
ansistrings, dynamic arrays, and interfaces; and all those use
Interlocked* functions unde
Hello:
I would like to contribute code to the Free pascal community.
Specifically, it is a CodeBlocks C++ project to compile using MinGW C++
compiler to create a static libraries from www.polarssl.org SSL C-code
for usage by Lazarus/Freepascal on Windows.
It is a little tricky to get all the C c
I thought I had publicly declared what I wanted to do.
Here is the example code again for ease of reference:
Type
Class TTest(TObject)
public
nflag : integer ;
sflag : string[30]
end;
Gui Thread
gtest := TTest.Create ;
Thread #1 - Constantly changing values
while true do
begin
Hi,
When I have an undeclared identifier like
begin
i :=3;
end;
fpc 2.6.4 reports:
unit1.pas(42,7) Error: Identifier not found "i"
Note that it points to the semicolon instead of the i.
Is this by design or is it a bug?
Mattias
___
fpc-pascal ma
On Wed, 04 Jun 2014 15:03:31 -0400
"Saunders, Rich" wrote:
>[...]
> Whether static variables are more or less thread safe is for you to
> decide since you know what you are doing with them. I don't think either
> short strings or Strings are inherently more or less thread safe. It
> depends on
On 04 Jun 2014, at 20:42, m...@rpzdesign.com wrote:
> For anybody who has followed this thread, there is some disagreement
> over the thread safety of shortstrings. And in this case, a shortstring
> with a clearly defined maximum length.
>
> Some have clearly said string[30] is NOT thread safe.
On 2014-06-04 14:42, m...@rpzdesign.com wrote:
For anybody who has followed this thread, there is some disagreement
over the thread safety of shortstrings. And in this case, a
shortstring
with a clearly defined maximum length.
Some have clearly said string[30] is NOT thread safe.
Rich indica
For anybody who has followed this thread, there is some disagreement
over the thread safety of shortstrings. And in this case, a shortstring
with a clearly defined maximum length.
Some have clearly said string[30] is NOT thread safe.
Rich indicated below he feels they ARE SAFE.
Hmmm. Time for
On Wed, 4 Jun 2014, joha...@nacs.net wrote:
On Wed, Jun 04, 2014 at 01:19:33PM -0400, m...@rpzdesign.com wrote:
On 6/4/2014 1:16 PM, Michael Van Canneyt wrote:
On Wed, 4 Jun 2014, m...@rpzdesign.com wrote:
Hello:
Is a string[30] declaration under Linux thread safe?
No.
Michael.
Jus
On Wed, Jun 04, 2014 at 01:19:33PM -0400, m...@rpzdesign.com wrote:
On 6/4/2014 1:16 PM, Michael Van Canneyt wrote:
On Wed, 4 Jun 2014, m...@rpzdesign.com wrote:
Hello:
Is a string[30] declaration under Linux thread safe?
No.
Michael.
Just as I suspected.
So every time a new value is
On 2014-06-04 13:22, m...@rpzdesign.com wrote:
I guess what I was really asking is:
Is there a way to treat an array of chars as a string.
I like the string handling patterns of freepascal but I want
the memory stability of a static array of chars
so I can be used in multi-thread operations wit
I guess what I was really asking is:
Is there a way to treat an array of chars as a string.
I like the string handling patterns of freepascal but I want
the memory stability of a static array of chars
so I can be used in multi-thread operations without
a lot a critical section considerations.
Ch
On 6/4/2014 12:22 PM, m...@rpzdesign.com wrote:
> I like the string handling patterns of freepascal but I want
> the memory stability of a static array of chars
> so I can be used in multi-thread operations without
> a lot a critical section considerations.
Have you actually verified that adding a
Just as I suspected.
So every time a new value is assigned to a string[30] variable, memory
is allocated and changed by the compiler, so the internal string pointer
changes as well.
And the only recourse is critical sections for memory access.
Correct?
CHeers,
marco
On 6/4/2014 1:16 PM, Mich
On Wed, 4 Jun 2014, m...@rpzdesign.com wrote:
Hello:
Is a string[30] declaration under Linux thread safe?
No.
Michael.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Hello:
Is a string[30] declaration under Linux thread safe?
I am not worried about atomicity, just that the memory for a string[30]
if thread safe.
For UTF8String, it is not.
I have 2 threads which are comparing/changing memory and I do not
want criticalsections wrapping the memory accesses for
This program works (at least on windows XP) but must be changed according
to your language :
program consprg;
{$mode objfpc}{$H+}
uses
Classes, Crt, windows;
const
CloseItemString = '&Fermer'; // '&Fermer' : french
// probably '&Close' in englis
On Tue, June 3, 2014 17:48, Ingmar Tulva wrote:
> If you are writing for Windows, you just need to read the documentation
> on window style. WS_CAPTION, WS_MINIMIZEBOX and others, I must check the
> documentation every time I assign the style flags. See e.g.
> http://msdn.microsoft.com/en-us/librar
If you are writing for Windows, you just need to read the documentation
on window style. WS_CAPTION, WS_MINIMIZEBOX and others, I must check the
documentation every time I assign the style flags. See e.g.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms632600%28v=vs.85%29.aspx
If you
21 matches
Mail list logo