forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


VDSLIST.dll bug

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Product Support
View previous topic :: View next topic  
Author Message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Feb 04, 2003 11:14 pm    Post subject: VDSLIST.dll bug Reply with quote

I checked out the VDSLIST.dll contained in the VDSDLL 3 package.

There seems to be a bug in it, e.g.:
%%item = @lst(item,1,2)
always returns nothing.

But documentation states that
@lst(ITEM, <list name>{, <index position>})
returns the list entry at the current index position in the list named <list name>.

%%item = @lst(item,1) works normal.

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing


Last edited by Dr. Dread on Tue Mar 11, 2003 10:25 am; edited 1 time in total
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Feb 04, 2003 11:17 pm    Post subject: Reply with quote

and... Does %%item = @lst(item,1,3) work? Is there an item at
index position 2?

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Feb 05, 2003 6:42 am    Post subject: Reply with quote

FreezingFire wrote:
and... Does %%item = @lst(item,1,3) work? Is there an item at
index position 2?


Sorry. Maybe I wasn't too clear about it. It's the syntax as such that does not work. Any item that
you try to retrieve by specifying the list index number in @lst(item,..,..) turns up empty.

The problem can be overcome by doing for instance
lst seek,1,2
%%item = @lst(item,1)
instead.
Thats works OK. But I wanted to let Tommy know that something is wrong either in the DLL or
the documentation.

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Feb 05, 2003 10:57 am    Post subject: Reply with quote

Another bug:

Documentation says:
@LST(MATCH, <list name>, <text>)
Returns 1 if <text> is found in the list named <list name>, starting from the current index position, otherwise this
will return nothing. If <text> is found, the current index position will be set to the position of the match.


However, if you run something like this
Code:

  repeat
    if @equal(1,@LST(MATCH,1,%%search))
      %%found = %%found@lst(NEXT,1)@CR()
    end
  until @null(@LST(MATCH,1,%%search))

you will end up in an eternal loop because even though the list index pos is advanced by @lst(NEXT,1)
then @lst(MATCH...) seems to always start from the top so if there's just 1 match in the file it will
keep on finding that item.

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Feb 11, 2003 7:45 am    Post subject: Reply with quote

Bug No. 3:

Code:

  external vdslist.dll
  lst create,1
  lst add,1,Test1
  lst add,1,Line2
  lst add,1,Line3
  lst assign,1,Two@cr()new lines
  info #@lst(text,1)#


Try that code - should put two lines into the list, but instead the whole list turns out empty.

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing


Last edited by Dr. Dread on Wed Feb 12, 2003 7:28 am; edited 2 times in total
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Feb 11, 2003 9:20 pm    Post subject: Reply with quote

S.A.D.E. s.a.r.l. wrote:
The LIST ASSIGN command copies the contents of <list> to <list>

Copyright © 1995 - 2002 S.A.D.E. s.a.r.l. / All rights are reserved.


This may not apply to the VDSLIST.DLL since I haven't tested it lately, but
the actual LIST documentation for VDS explains that the LIST ASSIGN
command should be used like LIST ASSIGN,1,2... which assigns the contents
of 1 to 2. Confused

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Feb 12, 2003 6:44 am    Post subject: Reply with quote

Hey FF!

You're right of course about the VDS lists. But quoting from the VDSLIST.DLL
documentation:

Code:
LST ASSIGN, <list name>, <list name 2>
  Copies the contents of the list <list name 2> to the list <list name>.

LST ASSIGN, <list name>, <text>
  Adds the text <text> to the list <list name>. <text> mustn’t be equal to an existing list name. New entries will
  start at @CR() characters in <text>.
 

BUG !! This last one will empty the entire list. Not even the new text will be there...

Greetz
Dread

PS: Actually normal VDS lists can use the same syntax. E.g.
Code:
list create,1
list assign,1,Line1@CR()line2
info @text(1)

will put 2 new lines into list 1.

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Fri Feb 21, 2003 12:44 pm    Post subject: Reply with quote

I don't know whether this is bug No. 4 or a feature, but
@LST(MATCH, <list name>, <text>)
is always case-sensitive. Nothing mentioned about that in the documentation.

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Fri Aug 01, 2003 7:28 am    Post subject: Reply with quote

All of these problems should be resolved in the new work-in-progress VDSDLL 3.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Fri Aug 01, 2003 7:49 am    Post subject: Reply with quote

Grrrreeaatt! That would make things so much easier, especially because VDS itself cannot handle
lists above 100,000 lines Very Happy

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Product Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group