El 08/07/2019 a las 22:43, James Richters escribió:
ports that are defined by port numbers and pins in an ini file,
Well, then they are dynamic. They are not hardcoded.
I would use something like:
TPortIdentifier=(Pin_1, pin_2, Port_x, Port_y...);
TIOPort=object
private
FPo
discussions
Cc: Sven Barth
Subject: Re: [fpc-pascal] specify variable name with string variable
James Richters mailto:ja...@productionautomation.net> > schrieb am Mo., 8. Juli 2019, 22:44:
SetStoragePinByName('Ini_Opto_Enable_Positive_Pin', True) ;
And it would somehow
-pascal] specify variable name with string variable
James Richters mailto:ja...@productionautomation.net> > schrieb am Mo., 8. Juli 2019, 22:44:
SetStoragePinByName('Ini_Opto_Enable_Positive_Pin', True) ;
And it would somehow get the value of 'Ini_Opto_Enable_Positive_Pin
James Richters schrieb am Mo., 8. Juli
2019, 22:44:
> SetStoragePinByName('Ini_Opto_Enable_Positive_Pin', True) ;
>
> And it would somehow get the value of 'Ini_Opto_Enable_Positive_Pin
>
That indeed sounds like something where you could use classes together with
published properties. At least i
another array also referenced by the same string and then I could make
my calls like that.
James.
From: fpc-pascal On Behalf Of
Santiago A.
Sent: Monday, July 8, 2019 3:40 PM
To: fpc-pascal@lists.freepascal.org
Subject: Re: [fpc-pascal] specify variable name with string variable
El
El 07/07/2019 a las 21:58, James Richters escribió:
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
Wr
: Monday, July 8, 2019 10:54 AM
To: fpc-pascal@lists.freepascal.org
Subject: Re: [fpc-pascal] specify variable name with string variable
You can use the TFPGMap class in fgl unit to implement the dictionary.
fgl should be available in 3.0.4. Try to replace the Generics.Collections with
fgl and the
> This might sound silly, but is it possible to somehow specify a variable
> with a string containing the name of the variable?
Yes it certainly is. I wrote a unit that can handle arbitrary variable
types for my project pmake. Pmake it a build tool for pascal.
https://github.com/daar/pmake/blob
: Monday, July 8, 2019 10:54 AM
To: fpc-pascal@lists.freepascal.org
Subject: Re: [fpc-pascal] specify variable name with string variable
You can use the TFPGMap class in fgl unit to implement the dictionary.
fgl should be available in 3.0.4. Try to replace the Generics.Collections with
fgl and the
on how to compile the current source
code?
James
-Original Message-
From: fpc-pascal On Behalf Of James
Richters
Sent: Monday, July 8, 2019 6:48 AM
To: 'FPC-Pascal users discussions'
Subject: Re: [fpc-pascal] specify variable name with string variable
Thank you for the answer
On 08/07/2019 14:09, James Richters wrote:
I'm on windows
Generics.Collections seems to be something that was added after 3.0.4, I've
downloaded the current FPC source code, but I’m not sure how to build it.. can
someone point me in the right direction on how to compile the current source
On 08/07/2019 14:09, James Richters wrote:
I'm on windows
Generics.Collections seems to be something that was added after 3.0.4, I've
downloaded the current FPC source code, but I’m not sure how to build it.. can
someone point me in the right direction on how to compile the current source
al Message-
From: fpc-pascal On Behalf Of James
Richters
Sent: Monday, July 8, 2019 6:48 AM
To: 'FPC-Pascal users discussions'
Subject: Re: [fpc-pascal] specify variable name with string variable
Thank you for the answer and the example... I didn't know there was such a
thing as a
l On Behalf Of James
Richters
Sent: Monday, July 8, 2019 6:48 AM
To: 'FPC-Pascal users discussions'
Subject: Re: [fpc-pascal] specify variable name with string variable
Thank you for the answer and the example... I didn't know there was such a
thing as a variable dictionary, but It
scal users discussions
Subject: Re: [fpc-pascal] specify variable name with string variable
Hi all! It's my first answer to the mailing list, hopefully I won't screw
anything up.
On Sun, Jul 7, 2019 at 10:58 PM James Richters
wrote:
>
> This might sound silly, but is it pos
Hi all! It's my first answer to the mailing list, hopefully I won't
screw anything up.
On Sun, Jul 7, 2019 at 10: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?
You might want to try u
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
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
Writeln(Varia
> 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 about
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 ShowVar
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 the
21 matches
Mail list logo