Re: [fpc-pascal] specify variable name with string variable

2019-07-07 Thread James Richters
Is there an example of how declare them this way? I only have about 50 variables I wish to do this with. -Original Message- From: fpc-pascal On Behalf Of Michael Van Canneyt Sent: Sunday, July 7, 2019 6:20 PM To: FPC-Pascal users discussions Subject: Re: [fpc-pascal] specify variable

Re: [fpc-pascal] specify variable name with string variable

2019-07-07 Thread Michael Van Canneyt
On Sun, 7 Jul 2019, James Richters wrote: This might sound silly, but is it possible to somehow specify a variable with a string containing the name of the variable? For example: Var MyVariable1 : Word; MyVariableName : String; Procedure ShowVariable(Variablename); Begin

Re: [fpc-pascal] specify variable name with string variable

2019-07-07 Thread Ryan Joseph
> On Jul 7, 2019, at 3:58 PM, James Richters > wrote: > > This might sound silly, but is it possible to somehow specify a variable > with a string containing the name of the variable? Does you mean like RTTI so you can get a pointer to a local variable by name? I was actually curious

Re: [fpc-pascal] specify variable name with string variable

2019-07-07 Thread Dmitry Boyarintsev
associative array? On Sunday, July 7, 2019, James Richters wrote: > This might sound silly, but is it possible to somehow specify a variable > with a string containing the name of the variable? > > For example: > > Var >MyVariable1 : Word; >MyVariableName : String; > > Procedure

[fpc-pascal] specify variable name with string variable

2019-07-07 Thread James Richters
This might sound silly, but is it possible to somehow specify a variable with a string containing the name of the variable? For example: Var MyVariable1 : Word; MyVariableName : String; Procedure ShowVariable(Variablename); Begin Writeln(Variablename,' = $', inttohex((Somehow get

Re: [fpc-pascal] Implementation of variant records

2019-07-07 Thread Sven Barth via fpc-pascal
Am 07.07.2019 um 12:54 schrieb Sven Barth: Am 07.07.2019 um 02:55 schrieb Ralf Quint: On 7/6/2019 12:21 PM, Florian Klaempfl wrote: Am 05.07.2019 um 13:53 schrieb Ralf Quint: Shouldn't a PACKED Record guarantee that values are aligned at the byte level? It does in TP, but the ISO says only

Re: [fpc-pascal] Implementation of variant records

2019-07-07 Thread Sven Barth via fpc-pascal
Am 07.07.2019 um 02:55 schrieb Ralf Quint: On 7/6/2019 12:21 PM, Florian Klaempfl wrote: Am 05.07.2019 um 13:53 schrieb Ralf Quint: Shouldn't a PACKED Record guarantee that values are aligned at the byte level? It does in TP, but the ISO says only that it shall be economised. Well, the ISO

Re: [fpc-pascal] Developing a mini ERP / web based development

2019-07-07 Thread Michael Van Canneyt
On Sun, 7 Jul 2019, Sven Barth via fpc-pascal wrote: Graeme Geldenhuys schrieb am So., 7. Juli 2019, 11:45: Does FPC support annotations yet? In the Object Pascal world they are called custom attributes, are accessible through the RTTI and their syntax is [AttributeName(Arguments)].

Re: [fpc-pascal] Developing a mini ERP / web based development

2019-07-07 Thread Graeme Geldenhuys
On 07/07/2019 11:09 am, Sven Barth via fpc-pascal wrote: > There exists a branch with them and it's "just" a matter of integrating > them into trunk. Nice, that will be a real game changer! Thanks for the info Sven. Regards, Graeme ___ fpc-pascal

Re: [fpc-pascal] Developing a mini ERP / web based development

2019-07-07 Thread Sven Barth via fpc-pascal
Graeme Geldenhuys schrieb am So., 7. Juli 2019, 11:45: > Does FPC support annotations yet? > In the Object Pascal world they are called custom attributes, are accessible through the RTTI and their syntax is [AttributeName(Arguments)]. There exists a branch with them and it's "just" a matter of

Re: [fpc-pascal] Developing a mini ERP / web based development

2019-07-07 Thread Graeme Geldenhuys
Hi, Does FPC support annotations yet? So in the future (or hopefully now), we could create something like what many Java frameworks allow. Simply annotate a plain class to do the magic for you - a massive reduction in boilerplate code. So we could end up with a RESTful resource/controller as