RTC Forums
November 23, 2024, 02:18:09 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
Passing a Tlist object to an RTC function. Possible ?
Pages: [
1
]
« previous
next »
Print
Author
Topic: Passing a Tlist object to an RTC function. Possible ? (Read 5032 times)
mastinfo
RTC License
Posts: 29
Passing a Tlist object to an RTC function. Possible ?
«
on:
July 05, 2018, 11:13:30 AM »
Hello,
i'm wondering if is possible to have as parameter for and RTC function a Tlist object (system.Generics.collections) and how.
The class is defined as follow:
Tmyrec=record
field1:string;
field2:string;
something else ....
end;
Tmyrecords=class(TList<Tmyrec>)
end;
thanks in advance
Roberto
Logged
mastinfo
RTC License
Posts: 29
Re: Passing a Tlist object to an RTC function. Possible ?
«
Reply #1 on:
July 05, 2018, 11:47:32 AM »
Maybe i have found the solution by myself: i can use an array where each element is a record
Let me know if there's another solution that allow to pass directly the Tlist as parameter.
thanks
Roberto
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Passing a Tlist object to an RTC function. Possible ?
«
Reply #2 on:
July 05, 2018, 12:09:19 PM »
You've found the correct solution.
When you have a list of elements without names, you can use an Array ("asArray" = "TRtcArray" class). And if you have a collection of elements where each element has a name, you can use a Record ("asRecord" = "TRtcRecord" class). Since every single element can be of any data type supported by RTC Value Objects (String, Integer, Data, Record, Array, ...), you can create any structure you can think of simply by combining these data types.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...