ed procedure as parameter question
On Thu, Apr 15, 2010 at 2:51 PM, Bruce Bauman
wrote:
> I am porting a large amount of existing Pascal code (MetaWare) to Free
> Pascal. Unfortunately, this code makes extensive use of nested
> procedures, and the nested procedures often reference variables
I am porting a large amount of existing Pascal code (MetaWare) to Free
Pascal. Unfortunately, this code makes extensive use of nested
procedures, and the nested procedures often reference variables in the
enclosing scope.
I know that I can't pass the nested routine by address to another
procedure;
I'm running CentOS 5.3 (x86_64), and want to install FPC 2.4 on my
machine, preferably from an RPM, but I can't because of a failed
dependency on libtinfo. I've found many references to this problem in
the mailing lists, but am unsure of what the easiest solution is.
1) Can I install the FPC RPM w
I've read through the documentation several times and cannot figure this
out. The documentation is pretty unclear on this.
I want a command line equivalent to {$PACKRECORDS 1}. Is there a way to
do this via the command line?
Thanks.
-- Bruce
CONFIDENTIALITY NOTICE: This e-mail is confi
Will it cause problems if the unit name (e.g. unit foo__bar;) doesn't match the
source filename?
I want to source filename to remain unchanged (e.g. bar.pas), but the unit name
(and .ppu and .o filenames) to be different (e.g. foo__bar.o, foo__bar.ppu,
unit foo__bar). Thus, the .ppu files are
If I am compiling a file bar.pas, but I want the resulting .o filename
to be something different, is there a way to do this?
For example, I want the object filename to be foo__bar.o, but the source
file is just bar.pas.
Right now we can get this to work by creating a symlink from
foo__bar.p
I'm trying to port/debug some ugly Pascal code.
Is there a way I can tell if an arbitrary address is within the heap or
stack?
I want to do something like:
Assert(ValidHeapAddress(a))
Assert(ValidStackAddress(a))
to catch potential errors in the code.
I'm guessing any address b
To: FPC-Pascal users discussions
Subject: Re: [fpc-pascal] convert st_mtime from BaseUnix.FpStat to year,
month,day, hour, minute, sec
On 23 Nov 2009, at 00:42, Bruce Bauman wrote:
> If you look at the HTML documentation:
>
> http://www.freepascal.org/docs-html/rtl/
I need to convert the st_time field of the record returned by BaseUnix.FpStat
to the year, month, day, hour, minute and second and need to compensate for the
local timezone.
I've read over the RTL documentation and am thoroughly confused. Some of the
documentation of the interfaces say that th
I'm porting some code which called "system". Is there an equivalent under FPC,
or do I need to use FpFork/FpExecV?
-- Bruce
CONFIDENTIALITY NOTICE: This e-mail is confidential and intended
solely for the use of the individual or entity to which it is addressed. If
you are not the intended recip
I'm porting some code which "beeps" the console. When I use sysutils.beep() it
doesn't work under Linux.
What's the easiest way to accomplish this?
Thanks.
-- Bruce
CONFIDENTIALITY NOTICE: This e-mail is confidential and intended
solely for the use of the individual or entity to which it is
I am using the FpTimes function from the BaseUnix package. The
documentation says it returns -1 on an error, otherwise the number of
clock ticks since boot time. However, the return type of this function
is TClock, which is unsigned.
This, if I say:
X := BaseUnix.FpTimes(T);
if (X <> -1) then ..
I am trying to convert a huge amount of code written in MetaWare
Professional Pascal to Free Pascal. Unfortunately, the MetaWare code
makes fairly extensive use of Pascal conformant arrays.
Free Pascal's open arrays are similar, but modifying all of the uses of
conformant arrays would be a fairly
We are porting an application which needs to write to the system log via
syslog. We are running under Red Hat Enterprise Linux.
Is there an existing mechanism to do this, or do we need to interface to C code
ourselves?
Thanks.
-- Bruce
CONFIDENTIALITY NOTICE: This e-mail is confidential an
Great, although ignoring the "packed" would be very useful as we are
mechanically translating a large body of code.
-- Bruce
From: fpc-pascal-boun...@lists.freepascal.org on behalf of Jonas Maebe
Sent: Fri 10/16/2009 4:50 AM
To: FPC-Pascal users discussions
packed not
allowed)?
On 15 Oct 2009, at 14:49, Bruce Bauman wrote:
[packed for open array parameters]
> Is there a reason why "packed" is not allowed in this context?
I think it's simply because I forgot to add it when adding support for
packed arrays. Please file a b
I am translating some Pascal code from MetaWare Professional Pascal to
Free Pascal.
The MetaWare code uses conformant arrays, which are not supported within
Free Pascal. We are thus translating these to use Free Pascal open
arrays.
However, Free Pascal does not allow the "packed" qualifier on the
17 matches
Mail list logo