Thank you!On Dec 27, 2023 7:46 AM, Sven Barth via fpc-pascal wrote:
Am 26.12.2023 um 21:29 schrieb Amir---
via fpc-pascal:
On 12/26/23 01:14, Sven Barth via
fpc-pascal wrote:
On Wed, Dec 27, 2023 at 3:42 PM Wayne Sherman wrote:
> Example using a TFileStream descendant and StreamIO AssignStream:
> ...(line 42 follows)
> FileWrite(TextRec(Output).Handle, Buffer, Count);
Although that worked (I don't know why) I intended line 42 to be:
FileWrite(TextRec(FOriginalStdOut)
Example using a TFileStream descendant and StreamIO AssignStream:
program TeeStdOut;
{$mode objfpc}
uses
Classes, SysUtils, StreamIO;
type
TTeeStream = class(TFileStream)
Private
FOriginalStdOut: Text;
FNewStdOut: Text;
public
constructor Create(const AFileName: string; Mode:
Am 27.12.2023 um 12:25 schrieb James Richters via fpc-pascal:
I wanted to write what I thought should be a simple procedure, just
instead of calling WRITELN() with some arguments,
call WRITELOG() with the same arguments that you would use to write to
a file, but my WRITELOG() procedure would
Am 26.12.2023 um 21:29 schrieb Amir--- via fpc-pascal:
On 12/26/23 01:14, Sven Barth via fpc-pascal wrote:
Amir--- via fpc-pascal schrieb am
Di., 26. Dez. 2023, 07:03:
Hi,
I want to retrieve the name of the fields in a record/class,
at run
time. It looks like "TVmt.vField
On Wed, Dec 27, 2023 at 3:25 AM James Richters wrote:
> I wanted to write what I thought should be a simple procedure, just instead
> of calling WRITELN() with some arguments, call WRITELOG() with the same
> arguments that you would use to write to a file, but my WRITELOG() procedure
> would write
It would be very useful if WriteStr() was a function that returned the
resulting string instead of returning it via an output parameter. Then you
could just wrap the Writeln parameters in WriteStr() and pass it to the new
logging procedure. Unfortunately, the ISO extension did not end up doing t
>Writeln() is special. You cannot duplicate it.
That's good to know, I can stop trying.
>What you can do is use WriteStr(), it has the same action as Writeln() but
writes to a string instead of a file.
I was hoping to just replace all existing Writeln()s with my procedure with
a global search and
I think he wants to define his own procedure.
The nearest thing that comes into my mind is using ARRAY OF CONST, but the call
requires square brackets, then:
procedure myproc (x: string; y: array of const);
begin ... end;
myproc ('Hello world', ['Number 1', 'Number 2', 3, 4.0]);
- Origina
Hello,
as it seems to take longer for the next major release, I'd appreciate if
automated snapshots could be provided either daily or weekly.
In the documentation, I found a link to
ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/ but I cannot login. I tried
with user=anynous and password=my-e
On Wed, 27 Dec 2023, James Richters via fpc-pascal wrote:
I wanted to write what I thought should be a simple procedure, just instead
of calling WRITELN() with some arguments,
call WRITELOG() with the same arguments that you would use to write to a
file, but my WRITELOG() procedure would
writ
I wanted to write what I thought should be a simple procedure, just instead
of calling WRITELN() with some arguments,
call WRITELOG() with the same arguments that you would use to write to a
file, but my WRITELOG() procedure would
write to the screen and the file.. but I can't figure out how to pa
12 matches
Mail list logo