Re: [fpc-pascal] TypeInfo question

2017-03-23 Thread Ryan Joseph
I think I already learned this and I forget when I had the idea about TypeInfo. 
:) 

This is basically the pattern I’m attempting. I have a generic class and I 
thought I could avoid specializing and making a subclass so that I could call a 
method if the type of the generic was a class. So what happens as you now is 
that I can’t cast “value” to TObject because if the generic was specialized as 
an integer for example, the type cast would be illegal and I get stuck at 
compile time (Illegal type conversion: "LongInt" to "TObject”).

Is there anyway I could push the type checking to runtime? I wanted to using 
writeln also to perform some printing for debugging but I get stuck at compile 
time again trying to mix, integers, strings, records, classes etc… in the 
generic. I would use an interface but there are compiler types and records 
involved so that’s not an option.

type
TLongIntMatrix = specialize TMatrix;
TObjectMatrix = specialize TMatrix;


function TMatrix.RetainValue (value: T): T;
begin
if typeKind = tkClass then
TObject(value).Retain;

result := value;
end;



Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TypeInfo question

2017-03-23 Thread Ryan Joseph

> On Mar 23, 2017, at 11:16 PM, Sven Barth via fpc-pascal 
>  wrote:
> 
> TypeInfo() simply inserts the load of a pointer value, so there's not even a 
> call.
> 
> 

Great, that’s what I was hoping. Thanks.

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said:
> 
> That said, if someone steps up and offers to update Libc for all supported 
> architectures, she/he is welcome. But be warned that this will not be easy.
> The structures depend highly on the CPU. Delphi supports only 2 CPUs (64-bit
> and ARM). FPC slightly more...

And did so in different, less orthogonal times.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Marco van de Voort
In our previous episode, Zo? Peterson said:
 
> The recommended FPC approach, on the other hand, is a combination of 
> "Use functions from the RTL, BaseUnix, or other random packages" and 
> "Import the relevant functions yourself", and the documentation is "Hope 
> some exists or that adding an fp prefix works". 

The baseunix unit was documented from the start and actually adheres better
to manual pages than unit libc (which quite often uses artefacts from old
kernels and not current mechanisms. Even current by 2003-4 standards)

And the fp prefix, while much maligned is at least systematic. No need to
call _write or so.

Yes, it is less complete, but for that it is portable.

> Add to that, sometimes the RTL does have the imports/record translations
> you need, but doesn't bother to expose them publicly.

> Free Pascal has done great things, and I absolutely appreciate all of 
> it, but not having a good alternative to Libc.pas or Delphi's new 
> Posix.*.pas APIs has definitely been an annoying pain point.

Could you name the mantis items with improvements/problems ?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Michael Van Canneyt



On Thu, 23 Mar 2017, Zoë Peterson wrote:


On 3/23/2017 12:31 PM, Marco van de Voort wrote:

It didn't help that some component maintainers like Synapse stuck to the
libc format way too long.  Only in 2007-2009 when FPC on OS X got important
that changed, I still use Indy(10) that switched much earlier to this day.


Having just removed the last vestiges of Libc.pas usage from our own 
project, this is entirely on the heads of the FPC maintainers.  Whatever 
the concerns regarding Libc.pas, it's usage was simple: Add "Libc" to 
your uses clause, look up (extensive) function documentation and sample 
code in the standard Posix man pages and StackOverflow.


The idea was, and is still today, that you can write applications that are
independent of libc, and talk to the kernel directly.

No-one has ever offered to maintain a Libc import unit. 
It was provided only as a courtesy to Kylix devs.


That said, if someone steps up and offers to update Libc for all supported 
architectures, she/he is welcome. But be warned that this will not be easy.

The structures depend highly on the CPU. Delphi supports only 2 CPUs (64-bit
and ARM). FPC slightly more...

Michael.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Graeme Geldenhuys
On 2017-03-23 16:19, Sven Barth via fpc-pascal wrote:
> In the end you'll just need the correct units to do GUI applications 

Yeah, but I don't see Embarcadero going down that route any time soon
[years if at all]. They already can't handle the amount of bug reports,
plus no native IDE for non-Windows platforms (you try and convince a
Linux developer to install Windows just to compile Linux applications).

Regards,
  Graeme

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Zoë Peterson

On 3/23/2017 12:31 PM, Marco van de Voort wrote:

It didn't help that some component maintainers like Synapse stuck to the
libc format way too long.  Only in 2007-2009 when FPC on OS X got important
that changed, I still use Indy(10) that switched much earlier to this day.


Having just removed the last vestiges of Libc.pas usage from our own 
project, this is entirely on the heads of the FPC maintainers.  Whatever 
the concerns regarding Libc.pas, it's usage was simple: Add "Libc" to 
your uses clause, look up (extensive) function documentation and sample 
code in the standard Posix man pages and StackOverflow.


The recommended FPC approach, on the other hand, is a combination of 
"Use functions from the RTL, BaseUnix, or other random packages" and 
"Import the relevant functions yourself", and the documentation is "Hope 
some exists or that adding an fp prefix works".  Add to that, sometimes 
the RTL does have the imports/record translations you need, but doesn't 
bother to expose them publicly.


Free Pascal has done great things, and I absolutely appreciate all of 
it, but not having a good alternative to Libc.pas or Delphi's new 
Posix.*.pas APIs has definitely been an annoying pain point.


--
Zoë Peterson
Scooter Software

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Florian Klämpfl
Am 23.03.2017 um 19:11 schrieb Sven Barth via fpc-pascal:
> On 23.03.2017 18:35, Florian Klämpfl wrote:
>> Am 23.03.2017 um 16:47 schrieb Mattias Gaertner:
>>> On Thu, 23 Mar 2017 16:08:20 +0100 (CET)
>>> Michael Van Canneyt  wrote:
>>>
 [...]
> When did FPC start to run on Linux? 1999?  

 I got the first "hello world" around 1995-1996, I think, 
 together with Mark May. (if memory serves well)
>>>
>>> Well, Delphi didn't start with a "Hello World". So that would be a
>>> little unfair as comparison.
>>> What about the time when FPC was able to compile itself?
>>
>> 9th august 1996 :)
>>
>> Mail from Michael:
> [...]
>>> I think we should synchronise our versions of the compiler. I've put a list
>>> of changes at the end of this mail, so you can update your sources.
>>> before you release the next version of the compiler, I think it would be
>>> nice if you send me the sources, so I can try to compile them under Linux.
>>> This way we can always keep the DOS and Linux version synchronised.
> 
> I take it this was before a version control system was used? :P

Yes, we started to use cvs end of November 1997.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Sven Barth via fpc-pascal
On 23.03.2017 18:35, Florian Klämpfl wrote:
> Am 23.03.2017 um 16:47 schrieb Mattias Gaertner:
>> On Thu, 23 Mar 2017 16:08:20 +0100 (CET)
>> Michael Van Canneyt  wrote:
>>
>>> [...]
 When did FPC start to run on Linux? 1999?  
>>>
>>> I got the first "hello world" around 1995-1996, I think, 
>>> together with Mark May. (if memory serves well)
>>
>> Well, Delphi didn't start with a "Hello World". So that would be a
>> little unfair as comparison.
>> What about the time when FPC was able to compile itself?
> 
> 9th august 1996 :)
> 
> Mail from Michael:
[...]
>> I think we should synchronise our versions of the compiler. I've put a list
>> of changes at the end of this mail, so you can update your sources.
>> before you release the next version of the compiler, I think it would be
>> nice if you send me the sources, so I can try to compile them under Linux.
>> This way we can always keep the DOS and Linux version synchronised.

I take it this was before a version control system was used? :P

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Florian Klämpfl
Am 23.03.2017 um 16:47 schrieb Mattias Gaertner:
> On Thu, 23 Mar 2017 16:08:20 +0100 (CET)
> Michael Van Canneyt  wrote:
> 
>> [...]
>>> When did FPC start to run on Linux? 1999?  
>>
>> I got the first "hello world" around 1995-1996, I think, 
>> together with Mark May. (if memory serves well)
> 
> Well, Delphi didn't start with a "Hello World". So that would be a
> little unfair as comparison.
> What about the time when FPC was able to compile itself?

9th august 1996 :)

Mail from Michael:

Am 09.08.1996 um 03:37 schrieb Michael Van Canneyt:
> Hello, Florian !
>
> The compiler is now fully functional.
> I've implemented the following to make it possible:
> switches:
>  -Fr for the full name of the error file
>  -Fg path to libgcc.a (needed, because we still link with c)
> environment variables :
>   PPC_ERROR_FILE
>   PPC_GCCLIB_PATH
> respectively. (I suppose it's obvious what they are for)
>
> We're now putting together a package. When it is finished, I'll send it to
> you.
>
> I think we should synchronise our versions of the compiler. I've put a list
> of changes at the end of this mail, so you can update your sources.
> before you release the next version of the compiler, I think it would be
> nice if you send me the sources, so I can try to compile them under Linux.
> This way we can always keep the DOS and Linux version synchronised.

[...]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Marco van de Voort
In our previous episode, Karoly Balogh (Charlie/SGR) said:
> 
> Well, there was Kylix anyway around 2001 or so, wasn't it? So not like
> supporting Linux is a rocket science, although FPC was definitely first.
> 
> My remark was more about, I still remember, Kylix had his own LibC unit,
> but because of (un)portability reasons, FPC never supported that anywhere
> but on i386. And that was already a source of massive whining, when people
> started to use x86_64 and other platforms, and they tried to compile their
> i386-only Kylix code elsewhere with FPC, and of course FPC was stupid and
> ugly for not supporting the LibC unit elsewhere.

It didn't help that some component maintainers like Synapse stuck to the
libc format way too long.  Only in 2007-2009 when FPC on OS X got important
that changed, I still use Indy(10) that switched much earlier to this day.

The fact that it took Inprise really long to spell out that Kylix was dead
didn't help either.

Note that the Linux unit in 1.0.x had the same faults as unit libc, except
its size. (and that includes being outdated, but I guess that goes for the
2.x style *nix rtl now too, since it is 13 years old last christmas)

The BSD maintaince of 1.0.x was truly a horror compared to 2.x, as the 1.0.x
BSD rtl was more a ifdefed version of the Linux RTL than something in its
own right.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Giuliano Colla

Il 23/03/2017 17:19, Sven Barth via fpc-pascal ha scritto:
In the end you'll just need the correct units to do GUI applications 
as well though one would need to do everything by hand as there'd be 
no VCL or FM :P


IOW with the newest Delphi for Linux you're in a worse condition than 
using old Kylix!


We are still supporting a lot of old Kylix applications, and, when I'm 
too lazy to bring up a VM with an old Linux supporting the Kylix IDE, I 
just edit the files using Lazarus, and then compile the app using dcc 
which still runs on today's distro's (provided you supply it the 
required Kylix libraries). Even the app runs on today distro's, provided 
you feed it with its 32 bit libraries.


Whenever possible we migrate the app to Lazarus, and then you feel like 
updating a Lazarus 0.9x app to Lazarus 1.6!


Giuliano



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Michael Van Canneyt



On Thu, 23 Mar 2017, Mattias Gaertner wrote:


On Thu, 23 Mar 2017 16:08:20 +0100 (CET)
Michael Van Canneyt  wrote:


[...]
> When did FPC start to run on Linux? 1999? 

I got the first "hello world" around 1995-1996, I think, 
together with Mark May. (if memory serves well)


Well, Delphi didn't start with a "Hello World". So that would be a
little unfair as comparison.
What about the time when FPC was able to compile itself?


Pretty soon after that. So end of 1996, I think. 
I never liked cross-compiling.


Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Sven Barth via fpc-pascal
Am 23.03.2017 13:05 schrieb "Graeme Geldenhuys" <
mailingli...@geldenhuys.co.uk>:
>
> Hi,
>
> Just thought I would mention, yesterday Delphi 10.2 was released which
> includes Linux support (I assume a cross-compiler). It is only available
> in the Enterprise edition product line though, and only Linux Server
> style apps are supported (no GUI/desktop apps).

In the end you'll just need the correct units to do GUI applications as
well though one would need to do everything by hand as there'd be no VCL or
FM :P

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TypeInfo question

2017-03-23 Thread Sven Barth via fpc-pascal
Am 23.03.2017 16:29 schrieb "Ryan Joseph" :
>
> I have some generics which operate on multiple types and instead of
making subclasses for certain types and overriding methods I wonder if
using the RTTI like:
>
> PTypeInfo(TypeInfo(T))^.kind = tkClass
>
> would be a good idea. How is TypeInfo() implemented exactly? I’m curious
if there are any string comparing, allocating memory etc... that would
adversely affect performance since these classes need to perform fast data
lookups/insertions.

TypeInfo() simply inserts the load of a pointer value, so there's not even
a call.

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Karoly Balogh (Charlie/SGR)
Hi,

On Thu, 23 Mar 2017, Mattias Gaertner wrote:

> > > When did FPC start to run on Linux? 1999?
> >
> > I got the first "hello world" around 1995-1996, I think,
> > together with Mark May. (if memory serves well)
>
> Well, Delphi didn't start with a "Hello World". So that would be a
> little unfair as comparison. What about the time when FPC was able to
> compile itself?

Well, there was Kylix anyway around 2001 or so, wasn't it? So not like
supporting Linux is a rocket science, although FPC was definitely first.

My remark was more about, I still remember, Kylix had his own LibC unit,
but because of (un)portability reasons, FPC never supported that anywhere
but on i386. And that was already a source of massive whining, when people
started to use x86_64 and other platforms, and they tried to compile their
i386-only Kylix code elsewhere with FPC, and of course FPC was stupid and
ugly for not supporting the LibC unit elsewhere.

So if this Delphi for Linux sticks around for a while, I predict the same
happening all over again (just with feature X)... And I "pray" to be wrong
on this.

Charlie
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Mattias Gaertner
On Thu, 23 Mar 2017 16:08:20 +0100 (CET)
Michael Van Canneyt  wrote:

>[...]
> > When did FPC start to run on Linux? 1999?  
> 
> I got the first "hello world" around 1995-1996, I think, 
> together with Mark May. (if memory serves well)

Well, Delphi didn't start with a "Hello World". So that would be a
little unfair as comparison.
What about the time when FPC was able to compile itself?


Mattias
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] TypeInfo question

2017-03-23 Thread Ryan Joseph
I have some generics which operate on multiple types and instead of making 
subclasses for certain types and overriding methods I wonder if using the RTTI 
like:

PTypeInfo(TypeInfo(T))^.kind = tkClass

would be a good idea. How is TypeInfo() implemented exactly? I’m curious if 
there are any string comparing, allocating memory etc... that would adversely 
affect performance since these classes need to perform fast data 
lookups/insertions.

Thanks.

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Michael Van Canneyt



On Thu, 23 Mar 2017, Mattias Gaertner wrote:


On Thu, 23 Mar 2017 13:15:20 +0100 (CET)
"Karoly Balogh (Charlie/SGR)"  wrote:


Hi,

On Thu, 23 Mar 2017, Graeme Geldenhuys wrote:

> Just thought I would mention, yesterday Delphi 10.2 was released which
> includes Linux support (I assume a cross-compiler). It is only available
> in the Enterprise edition product line though, and only Linux Server
> style apps are supported (no GUI/desktop apps). 


I can't wait until we get the blame that Free Pascal on Linux is now
incompatible with Delphi on Linux...


When did FPC started to run on Linux? 1999?


I got the first "hello world" around 1995-1996, I think, 
together with Mark May. (if memory serves well)


Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-23 Thread Sandro Cumerlato
No. The "" is a shell/cmdline convention, and API calls are generally not
shell.


Thank you Marco for the clarification.

Sandro Cumerlato
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-23 Thread Marco van de Voort
In our previous episode, Sandro Cumerlato said:
> ' delimiters are mandatory within this example because we are writing paths
> as string parameters directly into the source code.
> 
> I believe that I should use both ' and " in case of spaces within paths:
> 
> CopyFile('"c:\my silly path\autoexec.bat"','"c:\windows\temp\my silly
> path\autoexec.bat.backup"');

No. The "" is a shell/cmdline convention, and API calls are generally not
shell. 
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Marco van de Voort
In our previous episode, Mattias Gaertner said:
> > > in the Enterprise edition product line though, and only Linux Server
> > > style apps are supported (no GUI/desktop apps).  
> > 
> > I can't wait until we get the blame that Free Pascal on Linux is now
> > incompatible with Delphi on Linux...
> 
> When did FPC started to run on Linux? 1999?

It was there already in 1997. From the copyrights in the old units I think
it is rather 1995.  The old pre 2.0 Linux unit even had kernel 1.xisms in
it.

Afaik the Embarcidera Delphi Linux is ARC based btw.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-23 Thread Sandro Cumerlato
On 23 Mar 2017 11:34, "James Richters" 
wrote:

Thanks for the response, it got me on the right track and I got it working.




Happy to help you!

I originally did try “ instead of ‘ and have the same results.  I was using
‘  because of the example here: http://wiki.freepascal.org/CopyFile




> CopyFile('c:\autoexec.bat','c:\windows\temp\autoexec.bat.backup');

' delimiters are mandatory within this example because we are writing paths
as string parameters directly into the source code.

I believe that I should use both ' and " in case of spaces within paths:

CopyFile('"c:\my silly path\autoexec.bat"','"c:\windows\temp\my silly
path\autoexec.bat.backup"');

or is the CopyFile function smart enough to include delimiters
automatically?

Best regards,
Sandro Cumerlato
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Michael Ring
At least not from me, I felt already ripped off by Embarcadero by not 
delivering on their promise to bring Linux last summer (Fortunately I 
did not renew my Pro-Subscription). Seeing that they wanted to do a 2nd 
rip off by only giving it to Enterprise customers reassured me that that 
decision was a good one.


So for me Freepascal is the master, not only on x86_64 linux but also on 
armhf-linux, arm embedded, wonder how long it takes Embarcadero to make 
their product available on arm-linux.


So guys, pleae keep up your phantastic work, and goodby Delphi, we have 
been together since the good old Turbo-Pascal times, but you have 
changed into a money sucking beast, it breaks my heart but I am gone.


Michael

Am 23.03.17 um 13:15 schrieb Karoly Balogh (Charlie/SGR):

Hi,

On Thu, 23 Mar 2017, Graeme Geldenhuys wrote:


Just thought I would mention, yesterday Delphi 10.2 was released which
includes Linux support (I assume a cross-compiler). It is only available
in the Enterprise edition product line though, and only Linux Server
style apps are supported (no GUI/desktop apps).

I can't wait until we get the blame that Free Pascal on Linux is now
incompatible with Delphi on Linux...

Charlie
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Mattias Gaertner
On Thu, 23 Mar 2017 13:15:20 +0100 (CET)
"Karoly Balogh (Charlie/SGR)"  wrote:

> Hi,
> 
> On Thu, 23 Mar 2017, Graeme Geldenhuys wrote:
> 
> > Just thought I would mention, yesterday Delphi 10.2 was released which
> > includes Linux support (I assume a cross-compiler). It is only available
> > in the Enterprise edition product line though, and only Linux Server
> > style apps are supported (no GUI/desktop apps).  
> 
> I can't wait until we get the blame that Free Pascal on Linux is now
> incompatible with Delphi on Linux...

When did FPC started to run on Linux? 1999?


Mattias
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Graeme Geldenhuys
On 2017-03-23 12:15, Karoly Balogh (Charlie/SGR) wrote:
> I can't wait until we get the blame that Free Pascal on Linux is now
> incompatible with Delphi on Linux...


That crossed my mind too. God(*) help us all!



* - place with whatever name suites you.


Regards,
  Graeme

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Karoly Balogh (Charlie/SGR)
Hi,

On Thu, 23 Mar 2017, Graeme Geldenhuys wrote:

> Just thought I would mention, yesterday Delphi 10.2 was released which
> includes Linux support (I assume a cross-compiler). It is only available
> in the Enterprise edition product line though, and only Linux Server
> style apps are supported (no GUI/desktop apps).

I can't wait until we get the blame that Free Pascal on Linux is now
incompatible with Delphi on Linux...

Charlie
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Graeme Geldenhuys
Hi,

Just thought I would mention, yesterday Delphi 10.2 was released which
includes Linux support (I assume a cross-compiler). It is only available
in the Enterprise edition product line though, and only Linux Server
style apps are supported (no GUI/desktop apps).

Just my 2c worth ;-)

Regards,
  Graeme
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

2017-03-23 Thread James Richters
Thanks for the response, it got me on the right track and I got it working.

 

I originally did try “ instead of ‘ and have the same results.  I was using ‘  
because of the example here: http://wiki.freepascal.org/CopyFile 

 

I was able to get it to work without any ‘ or “  I even did a test with a space 
in the file name and it worked fine without  “   

It appears The function must put “ around it for you.

 

James

 

From: fpc-pascal [mailto:fpc-pascal-boun...@lists.freepascal.org] On Behalf Of 
Sandro Cumerlato
Sent: Thursday, March 23, 2017 1:30 AM
To: FPC-Pascal users discussions 
Subject: Re: [fpc-pascal] FreePascal Windows - Force files to write to disk

 

Try  "  char instead of  '  (char 39). I never use  '  under Windows. 

 

Best regards

Sandro Cumerlato 

 

On 22 Mar 2017 23:47, "James Richters"  > wrote:

I'm trying to use copyfile and cannot get it to work,  anyone have any ideas?

I'm using the procedure below.  My writeln showing the contents of the 
variables seems to indicate they are correct.  The souce file does exist and is 
correct, the destination file does not exitst.
I get an error 50 which is

ERROR_NOT_SUPPORTED  50 (0x32)
The request is not supported.

I don't see how copying a file I just created is not supported.  Does anyone 
have any ideas how to get this to work or what I may be doing wrong, or if 
there is a better way I should be copying my file?   I've tried using single 
quotes and double quotes around the file names.

Thanks

James


Uses
   Serial,Windows,jwanative,sysutils;

Procedure Copy_Backup_Rename(CBR_Filename:String);
var
  fileSource, fileDest: string;
  resultsofit : Boolean;

Begin
   fileSource := chr(39)+Prog_Drive+Prog_Path+'\'+CBR_Filename+'.tmp'+chr(39);
   fileDest := chr(39)+'C:'+Prog_Path+'\'+CBR_Filename+'.temp'+chr(39);
   writeln (filesource+''+filedest);
   resultsofit := CopyFile(PChar(fileSource), PChar(fileDest), False);
   writeln (resultsofit);
   writeln(getlasterror);
End;

Console output:
'C:\ProMill\BitTool.tmp''C:\ProMill\BitTool.temp'
FALSE
50

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org 
 
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal