Jump to content
Developer Wiki and Function Reference Links ×

Abstract data type list


Recommended Posts

Hello,

have anyone implemented an abstract datatype List in Vectorscript ?

In the kind of http://en.wikipedia.org/wiki/List_(abstract_data_type)

Now i save my datas in Arrays of Structures and have a lot of work to manage them.

But an abtract list will save many work, if there are the

functions List_delete, List_IsEmpty, ... first, next, remove, insert and so on.

Also the List can expand dynamic.

Also there can be a function List_sort(list:LIST; compare,swap:PROCEDURE) to sort the List.

Have anyone an experience with these implementation ?

Greetings, Uwe.

Link to comment

Hello,

I'm not sure if what you are after ? Everything can be done with arrays of structures ?

Yes, surely it can be done by DYNARRAY[] OF STRUCTURE.

My idea is, if anyone do it in the past, he can share his experience.

If not, but possible, i had to do it by myself.

To have this Type in a Library, will reduce the complexity of the main code.

You can't use generics in VS.

I am right, that the call with ...compare,swap:PROCEDURE) is not possible ?

Ok, it is not the main feature of this lib-idea.

Thank you.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...