I know you don't like objects, but maybe something like :
unit uAxisRecord;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
type
{ TAxisRecord }
TAxisRecord
=
object
X,Y,Z,A,B,C: Double;
function Value_from_Letter( _A
No, this is just a simplified example..
The procedure will be working with dozens of records, so I need a way to call
the procedure and specify which element of all the records to use...
it will not be called for every element.
James
-Original Message-
From: fpc-pascal On Behalf Of
w
On 12/19/20 7:16 PM, James Richters via fpc-pascal wrote:
Is there some syntax that would work to select the correct record based on the
variable so I can avoid having all the If statements?
do you need to show only one at a time or are you looping through and printing
all of them each time?
The best way to explain what I'm hoping to do is by example...
Say I have this record:
Type
Axis_Record = Record
X,Y,Z,A,B,C: Double;
End;
Var
AxisValue : Axis_Record;
Instead of this:
Procedure ShowAxis(Axisletter:Char);
Begin
If AxisLetter = 'X' Then
Writeln(AxisValue.X);
On 19/12/2020 22:35, Luca Olivetti via fpc-pascal wrote:
> I'm trying to use a c library where I can define a logging plugin.
>
> The c prototype for the callback is
>
> void (*log)(void *logContext, UA_LogLevel level, UA_LogCategory
> category, const char *msg, va_list args);
>
>
> however
Hello,
I'm trying to use a c library where I can define a logging plugin.
The c prototype for the callback is
void (*log)(void *logContext, UA_LogLevel level, UA_LogCategory
category, const char *msg, va_list args);
however I couldn't find a way to define a suitable callback in fpc sinc
https://github.com/magiblot/tvision
Someone enterprising could make a TurboPascal clone out of FPC. :-)
--
Liam Proven – Profile: https://about.me/liamproven
Email: lpro...@cix.co.uk – gMail/gTalk/gHangouts: lpro...@gmail.com
Twitter/Facebook/LinkedIn/Flickr: lproven – Skype: liamproven
UK: +44