On Sat, 9 Mar 2019, Anton Shepelev wrote:
Michael Van Canneyt about FileWrite and FileRead:
For these functions, you can get more info with
GetLastOSError, and use that to set InOutRes.
Thank you, but how do I translate the return value of
GetLastOSError into a value of InOutRes? The
Op 2019-03-09 om 21:45 schreef Anton Shepelev:
Marco van de Voort:
Really? So why can't you simply use untyped "file"?
I am writing a TextRec driver that shall work with a bare
THandle, e.g.:
Use (objpas.) fileread and filewrite
Michael Van Canneyt about FileWrite and FileRead:
> For these functions, you can get more info with
> GetLastOSError, and use that to set InOutRes.
Thank you, but how do I translate the return value of
GetLastOSError into a value of InOutRes? The translation
functions are privately implemented
Marco van de Voort:
> Really? So why can't you simply use untyped "file"?
I am writing a TextRec driver that shall work with a bare
THandle, e.g.:
Program Test;
uses TextDrv, SysUtils;
var
t: Text;
s: AnsiString;
h: THandle;
begin
h := FileOpen( 'C:\test.txt', fmOpenRead );
Op 2019-03-09 om 18:09 schreef Anton Shepelev:
FreePascal has many low-level cross-platform functions
scattered over multiple .inc files but not consolilated into
reusable cross-platform units. Consider, for example, the
functions
Really? So why can't you simply use untyped "file" ?
Hi,
09.03.2019 21:06, Anton Shepelev:
[...]
Pascal is a language where declaration and use of
variables is separated. It makes it easy to see what
[...]
a := a + Func1( b );
int b := Func2( a );
a := a - Func3( b );
Also worth reference are Bart's thoughts on the subject, in
two
On Sat, 9 Mar 2019, Anton Shepelev wrote:
Michael Van Canneyt to Anton Shepelev:
> function do_read (h: longint; addr: pointer; len:
> longint) : longint; function do_write(h: longint; addr:
> pointer; len: longint) : longint;
I also don't see why you need this. You have this
Michael Van Canneyt to Anton Shepelev:
> > function do_read (h: longint; addr: pointer; len:
> > longint) : longint; function do_write(h: longint; addr:
> > pointer; len: longint) : longint;
>
> I also don't see why you need this. You have this
> functionality available in a cross-platform
Anton Shepelev schrieb am Sa., 9. März 2019, 18:09:
> It would relieve the programmer of writing conditionally
> compiled OS-specific code sections for such basic operations
> as are already implemented in FreePascal's internals. I,
> for example, have to do it whenever my Windws/Unix program
>
Sven Barth:
> Pascal is a language where declaration and use of
> variables is separated. It makes it easy to see what
> variables are declared and what type they are. Inline
> variables mess this up as a variable can be declared
> somewhere inside the code. I use C++ to earn my living. I
>
On Sat, 9 Mar 2019, Anton Shepelev wrote:
Hello, all
FreePascal has many low-level cross-platform functions
scattered over multiple .inc files but not consolilated into
reusable cross-platform units. Consider, for example, the
functions
function do_read (h: longint; addr: pointer; len:
Hello, all
FreePascal has many low-level cross-platform functions
scattered over multiple .inc files but not consolilated into
reusable cross-platform units. Consider, for example, the
functions
function do_read (h: longint; addr: pointer; len: longint) : longint;
function do_write(h:
12 matches
Mail list logo