Bee wrote:
It might be the case, I'm not sure. In my case, sometimes my app (fcgi)
couldn't create a new requested thread, but at other times it created
successfully. It happened randomly which gave me enough headaches to
find what caused the problem. Such case didn't happen on windows.
http:/
Hi,
> I think that thread variables are automatically initialized to zero. So
> you just need to use them in such a way that zero is the desired start
> value.
Hmm, yes. I just checked the sourcecode and indeed, for Win32 and Unix at least
the threadvars are indeed initialized to zero. That woul
Hi,
suppose I need some threadvars inside dynamically allocated objects to keep
track of the number of calls to certain methods. Basic requirement is to keep
track of recursive calls per thread, so I tried implementing that with thread
vars. Only problem: How do I initialize them? I can't do it
Marco van de Voort wrote:
In our previous episode, Tom Verhoeff said:
This means that the if statement is passed 7 times without problem with
x = -1, and on the 8th pass, where x = -1 again, it bails out with an FPE.
Hmm, didn't the x87 copro stack had 7ish registers? And recursive you say?
:-
Datum: Thu, 14 Aug 2008 08:48:58 -0400
Von: Jeff Wormsley <[EMAIL PROTECTED]>
> be forced to check for conditions that aren't likely to ever occur. The
> extra expense in development time isn't worth the risk of not doing the
> checks. That cost vs risk analysis will be different for everyone.
Original-Nachricht
> Datum: Wed, 13 Aug 2008 22:03:23 +0100
> Von: Jonas Maebe <[EMAIL PROTECTED]>
> An: FPC-Pascal users discussions
> Betreff: Re: [fpc-pascal] Converting C\'s bit field struct
>
> On 13 Aug 2008, at 11:59, Vinzent Höfler wrote:
&g
> |if not SomeFunction <> Constant_Of_Sometype then {null};
Of course, usually it's without the "not"... ;) And with Boolean functions it's
a bit easier.
And I should have added that I never put in comments what I can easily put in
code. At first, comments don't get compiled, and second, nobod
Original-Nachricht
> Datum: Wed, 13 Aug 2008 16:02:10 -0400
> Von: Jeff Wormsley <[EMAIL PROTECTED]>
> An: FPC-Pascal users discussions
> Betreff: Re: [fpc-pascal] Compiler option to check return value ignorance
>
> Vinzent Höfler wrote:
> > I ju
Vincent Snijders wrote:
Vinzent Höfler schreef:
Joost van der Sluis wrote:
Ok, so I misunderstood you. You want that the compiler complains if you
don't assign the result of a function. While that can be done, I don't
think you want that.
Well, don't decide for others, please
Joost van der Sluis wrote:
Ok, so I misunderstood you. You want that the compiler complains if you
don't assign the result of a function. While that can be done, I don't
think you want that.
Well, don't decide for others, please. I am a stupid programmmer, I am
making mistakes all the time, a
Mattias Gärtner wrote:
Zitat von Vinzent Höfler <[EMAIL PROTECTED]>:
[...]
a: record end;
Thanks. I will use that.
What for? The C statement is empty, it's not a variable and not even a
type. So before translating that into an empty Pascal-record, you should
rather look at what the actual
leledumbo wrote:
Vinzent Höfler wrote:
Yes. Turn Extended Syntax off {$X-}, then a function result must be
assigned to a variable. At least it used to be that way.
...
so "inherited Create" did not compile anymore (and I remember that any
attempt to assign this "result"
leledumbo wrote:
Since no one answers on message board, I'll post it here.
C struct:
typedef unsigned int u32int;
typedef struct page
{
u32int present: 1; // Page present in memory
u32int rw : 1; // Read-only if clear, readwrite if set
u32int user : 1; // Super
Felipe Monteiro de Carvalho wrote:
On Wed, Aug 13, 2008 at 7:38 AM, Vinzent Höfler
<[EMAIL PROTECTED]> wrote:
What for? The C statement is empty, it's not a variable and not even a type.
So before translating that into an empty Pascal-record, you should rather
look at what the ac
Mattias Gaertner wrote:
On Tue, 12 Aug 2008 09:39:36 +0200
Jilani Khaldi <[EMAIL PROTECTED]> wrote:
Marc Weustink wrote:
Micha Nelissen wrote:
Mattias Gärtner wrote:
How to translate this:
struct a;
Isn't this a forward declaration? So sometime later it needs to
declare 'struct a { ... };'
leledumbo wrote:
Joost van der Sluis wrote:
And there's no way the compiler can detect this.
I don't think so. The compiler understand that a procedure doesn't return a
value while a function does (i.e. trying to return a value from a procedure
causes compile error). I haven't checked how com
Original-Nachricht
> Zitat von Roland Turcan <[EMAIL PROTECTED]>:
>
> > Hello Mattias,
> >
> > I have also uncommented some DebugLns which are inside of code:
> >
> > Compiling ./unit/ResConf.pas
> > Assembling resconf
> > An unhandled exception occurred at $00148A20 :
> > TOutpu
> Datum: Wed, 30 Jul 2008 10:10:09 -0700 (PDT)
> Von: Gene Buckle <[EMAIL PROTECTED]>
> An: FPC-Pascal users discussions
> Betreff: Re: [fpc-pascal] Translate C to Pascal
> > How to translate this:
> >
> > struct a;
> >
> >
> er...
>
> Closest would be:
>
> type
> record = foo
> ba
Mattias Gaertner wrote:
On Thu, 17 Jul 2008 10:45:22 +0200
"Vinzent Höfler" <[EMAIL PROTECTED]> wrote:
leledumbo <[EMAIL PROTECTED]>
Jonas Maebe-2 wrote:
Because there are easy ways around it (as you mention) and the
work to implement and maintain this would probably o
leledumbo <[EMAIL PROTECTED]>
>
> Jonas Maebe-2 wrote:
> >
> > Because there are easy ways around it (as you mention) and the work to
> > implement and maintain this would probably outweigh the usefulness.
> >
> Yes, it's easy but uncomfortable and needs more typing.
Well, sure, but printing
Marco van de Voort wrote:
Ahthe old goto arguinghow many beers have gone with it!
Linus is just right, since everyday the purists of the OO languages
still can't live without writing a GOTO; they just call it in another
"politically correct" way:
raise Exception.Create("TA-DA!")
ik wrote:
I think that the entire design of the Do_SysCall is malformed in the
way it assumes the number of parameters and also the type of them, so
as I asked before, how I can either call the syscall command without
assembler, or how I can pass an array of const (prior to that I asked
regardin
Graeme Geldenhuys wrote:
On 21/01/2008, Vinzent Höfler <[EMAIL PROTECTED]> wrote:
Yes, that's what I figured. What I don't get is how the editor extracts
the information _back_ from the file after the "tabstop" information has
been deleted (that's what it does on
Florian Klaempfl wrote:
Imo that plugin discussion is pretty useless. I'am coding in at least
four different editors pascal (fp ide, joe, lazarus, ultraedit) and I
fear there is no plugin for all editors I use :)
Same here, although the editors' names are a bit different. ;)
Vinzent.
___
Graeme Geldenhuys wrote:
I hope this will be my last reply. Please take a look at the flash
video on the ET website.
I don't have flash, so I am bound to check out the Java example.
There he uses two editors (gvim and gedit).
With appropriate plugins/scripts, I suppose.
And for the last
Daniël Mantione wrote:
Op Fri, 18 Jan 2008, schreef Vinzent Höfler:
Maybe my view is skewed too much by the use of Ada where even a
function declares a "record identifier". In Ada it is even possible to
do:
---
procedure Test is
X : Integer;
procedure B is
X : Intege
Michael Van Canneyt wrote:
You are wrong. It does not compile, neither in delphi, nor in FPC.
D is not found, because 'A' resolves to the local a, and then the
search is stopped.
Ok, I think I got it. It's probably the same reason why in
---
procedure Foo (const A : My_Type); overload;
proce
Daniël Mantione wrote:
Op Fri, 18 Jan 2008, schreef Vinzent Hoefler:
On Friday 18 January 2008 16:04, Michael Van Canneyt wrote:
On Fri, 18 Jan 2008, Daniël Mantione wrote:
Op Fri, 18 Jan 2008, schreef Michael Van Canneyt:
To the user, it may appear as a bunch of dots. To the compiler,
it d
Пётр Косаревский wrote:
Yes, you do. :)
Nevertheless
some_type = record
case Something : byte of
1: (x,y: word);
2: (z: longword);
end;
Thank you, Jonas and Vincent, but I was vague: what I want is blockread'ing, so
I have to use
record
Something: byte;
case byte
Jonas Maebe wrote:
On 13 Sep 2006, at 19:39, Vinzent Höfler wrote:
In FPC, nil = pointer(0) on all currently supported platforms, but in
principle it could be anything.
I'm making enemies now,
Where?
but:
If the NIL pointer is represented by another value (like 0xF780 or
Jonas Maebe wrote:
On 13 Sep 2006, at 14:00, Eduardo wrote:
I remember that on c a null pointer has value 0, but in ansi pascal it
has value 23.
>
The value of nil is not defined in the ISO Ansi Pascal standard.
Neither it is in any official C standard.
> In FPC, nil = pointer(0) on all c
Marc Santhoff wrote:
Am Mittwoch, den 13.09.2006, 14:00 +0200 schrieb Eduardo:
At 10:04 13/09/2006, you wrote:
Hi,
while fiddling with some C'isms I've stumbled over a function in a
library expecting an array of integers *or* a NULL pointer.
How can I hand over any NIL or 0 or something equal
Mattias Gaertner wrote:
I'm currently working on a h2pas gui for lazarus.
(lazarus/components/h2pas/h2paswizard.lpk).
h2pas does not translate every c 'sugar'.
1. Example
#define MPI_ARGV_NULL (char **)0
One translation could be:
const MPI_ARGV_NULL: PPChar = nil;
const
MPI_ARGV_NULL =
Wolfram Kläger wrote:
I had this error two or three times these days. I managed to get rid
> of it by moving a local method variable to a field. Example:
class.method
var
d3 : array[ .., .., ..] of ...
begin
...
Works, if length(d3) < unknown limit. When I get the unknown runtime
> error 20
Vinzent Höfler wrote:
Hmm. So we'd need a mutex inside a mutex. Now I know why they call it
recursive. ;) So it'll be something like that:
function Recursive_Mutex.Lock : ...;
begin
// Lock mutex inside mutex.
self.Owner_Check_Lock.Lock;
// Owned by current thr
Burkhard Carstens wrote:
Am Montag, 24. Juli 2006 22:05 schrieb Vinzent Höfler:
Burkhard Carstens wrote:
Am Montag, 24. Juli 2006 20:33 schrieb Vinzent Höfler:
Burkhard Carstens wrote:
[..]
btw. this is not TEvent, we are talking about, it's rtlevent ..
TEvent (in synconjs) is implem
Micha Nelissen wrote:
Vinzent Höfler wrote:
Currently all I see is a subtle semantic difference between Windows- and
Unix-Event's implementation.
AFAICS, it's as close as it can get. You mean subtle as in, unimportant,
or as in, possibly fatal ? :-) If possibly fatal, describe when
Burkhard Carstens wrote:
Am Montag, 24. Juli 2006 20:33 schrieb Vinzent Höfler:
Burkhard Carstens wrote:
[..]
... As long as rtlevent is used with this
in mind, it should give a consistent behaviour on windows and
linux.
"this in mind" means: The only way how rtlevent should be
Florian Klaempfl wrote:
I didn't understand and follow the whole thread but please submit a bug
report if something in FPC needs to be fixed :)
Well, I'll do as soon as I'm sure if there's a bug. :)
Currently all I see is a subtle semantic difference between Windows- and
Unix-Event's impleme
Burkhard Carstens wrote:
[..]
... As long as rtlevent is used with this
in mind, it should give a consistent behaviour on windows and linux.
"this in mind" means: The only way how rtlevent should be used is:
1. call rtlstartwait
2. start the code (e.g. start/resume a thread), that signals the
Burkhard Carstens wrote:
Am Montag, 24. Juli 2006 19:22 schrieb Vinzent Höfler:
Burkhard Carstens wrote:
Am Montag, 24. Juli 2006 17:27 schrieb Vinzent Hoefler:
- the rtlEvent works even with timeout (with my patch posted on
mantis), but this one clears the signaled state, when wait is
called
Burkhard Carstens wrote:
Am Montag, 24. Juli 2006 17:27 schrieb Vinzent Hoefler:
- the rtlEvent works even with timeout (with my patch posted on
mantis), but this one clears the signaled state, when wait is
called.
>>
*oh* Before the wait? That's not good. This cries for race conditions
and s
Marco van de Voort wrote:
Marco van de Voort wrote:
new keywords.
Other compilers will give you warnings about illegal compiler directives.
Bad assumption, the only one that matters, Delphi errors on unknown compiler
directives. So
you will have to ifdef anyway. (tested D6)
Does Delphi suppor
Marco van de Voort wrote:
new keywords.
Other compilers will give you warnings about illegal compiler directives.
Bad assumption, the only one that matters, Delphi errors on unknown compiler
directives. So
you will have to ifdef anyway. (tested D6)
Does Delphi support FPC style macros? In t
John Coppens wrote:
On Thu, 20 Jul 2006 21:11:49 +0200
Vinzent Höfler <[EMAIL PROTECTED]> wrote:
Alan Burns? That's a name which rings a bell. You could have send the
URL, though. ;)
http://www-users.cs.york.ac.uk/~burns/pf.html
Hmm, and taking a peek look at the examples, it doe
Marc Weustink wrote:
Steve Williams wrote:
Using some of the documented examples in the v2.5 spec:
Example A.1.1:
procedure a1(n: Integer; a: PSingleArray; b: PSingleArray);
var
i: Integer;
begin
{$omp parallel for}
for i := 1 to n - 1 do
b^[i] := (a^[i] + a^[i - 1]) / 2.0;
end;
Brrr..
Tomas Hajny wrote:
;-) What would you think about distribution of
Win32 version with install.bat script asking you
to choose whether you want to put cygwin1.dll in
system32 or your new bin directory?
So all you're asking for is a "If you don't know the answer, just press
"? Isn't that the d
John Coppens wrote:
On Mon, 17 Jul 2006 21:12:31 +0200
Florian Klaempfl <[EMAIL PROTECTED]> wrote:
I'am currently thinking about implementing OpenMP support in FPC.
Florian,
Have you looked at Pascal-FC (a language developped based Pascal/0, I
believe, by Alan Burns)?
Alan Burns? That's a
Marco van de Voort wrote:
Isn't there a copascal that already has established concurent pascal syntax?
Yes, there is, but its syntax is very limited AFAICS.
if not, the other wirthian languages look like logical providers?
Ada tasking? Well, too much overkill, I think. ;)
My problem with
101 - 149 of 149 matches
Mail list logo