Vb/lotus like Lists

User projects written in or related to FreeBASIC.
Lost Zergling
Posts: 334
Joined: Dec 02, 2011 22:51
Location: France

Vb/lotus like Lists

Postby Lost Zergling » Feb 04, 2012 23:48

Hello,
Previously a Lotus script programmer, i used to code like this :

Code: Select all

Dim Maliste List As String
MaListe("01")= value
MaListe("02")= value, etc..
Then, to parse list :
ForAll ref in MaListe
   Print ListTag(ref) +" - "+ ref
EndForAll
To test list :
If IsElement(MaListe("02")) Then
   Print "02 found : " + Maliste("02")
End If

I think this code is VB comp, but i didn't found something like this in FB, so I started a project on my side for "easy" lists,..
(trend to become a lists toolbox, groupby, lookup, .csv field access, logical remove.., so heavier and heavier) :-(
Typedef trainee !
Well I started from the listnode system i found in FB doc (by Parker), tring to go further and further,
then the kernel leads to something like this :

Code: Select all

Dim MaListe As List : Dim u As uLong
MaListe.Tag("01") : MaListe.Val(value)  'or MaListe.BlindTag("01") : MaListe.Val(value) = new node without testing, usefull on big list
MaListe.Tag("02") : MaListe.Val(value)  'string values here
For u=1 to MaListe.AllOf : MaListe.BlindStep 'Not testing each node when parsing
   Print MaListe.Tag +" - "+ MaListe.Val
Next u
To test list :
If MaListe.HasTag("02") Then
   Print "02 found : "+MaListe.ValTag("02") 'HasTag ptr not lost here !-)
End If

I don't know if this usable, anyway for easy code migration, if any,...
Not sure this really a "project",.. just a taste of rad and midrange systems management...
Technical level not very hight, sorry, the most interesting might be the concept.
So,.., any coment welcome,..
Richard
Posts: 3030
Joined: Jan 15, 2007 20:44
Location: Australia

Re: Vb/lotus like Lists

Postby Richard » Feb 05, 2012 0:51

@ Lost Zergling.
You can insert BBcode for a code box with the code button.
You can also insert a code box by typing
[code]
place your code here
[/code]
as you compose your post.
Welcome to FB.
Lost Zergling
Posts: 334
Joined: Dec 02, 2011 22:51
Location: France

Re: Vb/lotus like Lists

Postby Lost Zergling » Feb 07, 2012 22:36

Thank you Richard.
Looks like not many interested persons yet,...source a little bit later maybe, still working on it.
Lost Zergling
Posts: 334
Joined: Dec 02, 2011 22:51
Location: France

VB/Lotus Like List Source link (not finished)

Postby Lost Zergling » Feb 08, 2012 22:46


Return to “Projects”

Who is online

Users browsing this forum: No registered users and 6 guests