Re: [fpc-pascal] Cross compile linux->solaris?

2017-04-28 Thread Mark Morgan Lloyd
On 28/04/17 18:04, Bart wrote: Hi, Thought it would be fun to test a little cgi web programming. The server tha hosts my website returns this (on unam -a):SunOS aklathep 5.10 Generic_150401-49 i86pc i386 i86pc Solaris I only have (32-bit) fpc on Windows and Linux.Does anyone have a working cross

[fpc-pascal] Cross compile linux->solaris?

2017-04-28 Thread Bart
Hi, Thought it would be fun to test a little cgi web programming. The server tha hosts my website returns this (on unam -a): SunOS aklathep 5.10 Generic_150401-49 i86pc i386 i86pc Solaris I only have (32-bit) fpc on Windows and Linux. Does anyone have a working cross compile setup from linux32 -

Re: [fpc-pascal] Correct syntax for initialized constants/variables

2017-04-28 Thread Ralf Quint
On 4/27/2017 12:22 PM, Ewald wrote: > On 27/04/17 20:49, Ralf Quint wrote: >> I try to include some initialized constants/variables in an application >> of mine, but somehow stumbled upon a stupid little problem that I can't >> figure out myself after nights on the computer. >> >> I see in the refe

Re: [fpc-pascal] Record operator for assignment

2017-04-28 Thread Sven Barth via fpc-pascal
Am 28.04.2017 14:09 schrieb "Mark Morgan Lloyd" < markmll.fpc-pas...@telemetry.co.uk>: > Is there any way that the length of an array being used for that sort of job can be defined by what's put into it, rather than having to be predefined? No, there is not. Though I already had the idea that such

Re: [fpc-pascal] Record operator for assignment

2017-04-28 Thread Mark Morgan Lloyd
On 28/04/17 04:30, Ryan Joseph wrote: Instead of making constructors and doing busy work It would be nice if Free Pascal could let you assign records outside of type blocks like: rec := (x: 0; y: 0; z: 0); Why isn’t this possible btw? I saw some C++ code do this and it seems like an obvious sol

Re: [fpc-pascal] Record operator for assignment

2017-04-28 Thread Sven Barth via fpc-pascal
Am 28.04.2017 09:23 schrieb "Ryan Joseph" : > > > > On Apr 28, 2017, at 1:06 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > > > No, I mean > > > > rec := (x + y) * 2; > > > > The compiler has to differentiate these two. > > I see. It’s the parenthesis that are problemat

Re: [fpc-pascal] Record operator for assignment

2017-04-28 Thread LacaK
I see. It’s the parenthesis that are problematic. I guess the solution would be curly brackets: rec := {x: 1; y: 2; z: 1} or some magic function like writeln: rec := TMyRec(x: 1; y: 2; z: 1) rec := @(x: 1; y: 2; z: 1) etc… or use like dynamic array constructor: (MyArr := TMyDynArrType.Cre

Re: [fpc-pascal] Record operator for assignment

2017-04-28 Thread Ryan Joseph
> On Apr 28, 2017, at 1:06 PM, Sven Barth via fpc-pascal > wrote: > > No, I mean > > rec := (x + y) * 2; > > The compiler has to differentiate these two. I see. It’s the parenthesis that are problematic. I guess the solution would be curly brackets: rec := {x: 1; y: 2; z: 1} or some magic