function to create structure with passed name

Discussions about the Liberty BASIC language, with particular reference to LB Booster
Adamkonrad
Posts: 3
Joined: Fri Mar 28, 2025 1:57 pm

function to create structure with passed name

Post by Adamkonrad »

Is it possible, without a conversion table of some sort in an array, to pass a name of structure to be created
what I mean is it possible to accomplish something of the sort a$ = "something" : struct a$, x as etc, etc by 'simple' means
guest
Site Admin
Posts: 209
Joined: Tue Apr 03, 2018 1:34 pm

Re: function to create structure with passed name

Post by guest »

Adamkonrad wrote: Mon Jun 23, 2025 3:45 pm Is it possible, without a conversion table of some sort in an array, to pass a name of structure to be created
what I mean is it possible to accomplish something of the sort a$ = "something" : struct a$, x as etc, etc by 'simple' means
I don't know of any 'simple' way. Creating a variable with a name determined at run time is relatively easy, but the same isn't true of a structure.

What's the use case? Why do you want to do this?

LBB supports arrays of structures, is there any way this capability could be leveraged to do what you want?