On 28.04.2017 08:01, Ryan Joseph wrote:
>
>> On Apr 28, 2017, at 12:43 PM, Sven Barth via fpc-pascal
>> wrote:
>>
>> It would introduce an ambiguity as "(x" could also complete to other
>> expressions (e.g. "(x + y) * 2" or even merely "(x)"). Especially older
>> Pascal compilers were geared t
> On Apr 28, 2017, at 12:43 PM, Sven Barth via fpc-pascal
> wrote:
>
> It would introduce an ambiguity as "(x" could also complete to other
> expressions (e.g. "(x + y) * 2" or even merely "(x)"). Especially older
> Pascal compilers were geared towards the simplicity of the language and thus
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
Am 28.04.2017 06:06 schrieb "Ryan Joseph" :
>
> 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
> On Apr 28, 2017, at 12:21 PM, LacaK wrote:
>
> you can workaround this by using typed constant for instance. Something like:
>
> const
> DEFAULT_REC: TMyRec = (x: 0; y: 0; z: 0 );
> var
> rec: TMyRec;
> begin
> rec := DEFAULT_REC; // or rec := Default(TMyRec) if you want zeroes
> ...
>
>
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);
you can workaround this by using typed constant for instance. Something
like:
const
DEFAULT_REC: TMyRec = (x: 0; y: 0; z:
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 solution that should have existed 20 year
Il 27/04/2017 20:49, Ralf Quint ha scritto:
I see in the reference docs (section 4.4) examples for arrays and
examples for records, but in my case, I would need to properly define an
array of records.
Any hint/example for the proper syntax in that case would be deeply
appreciated, it's probably
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 reference docs (section 4.4) examples for arra
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 reference docs (section 4.4) examples for arrays and
examples for records, but in my case, I
10 matches
Mail list logo