Valhalla Legends Forums Archive | General Programming | Addin Query's

AuthorMessageTime
Fr0z3N
Does anyone have a simple AddQuery Code that I would be able to use?
May 19, 2003, 2:22 PM
Tuberload
My suggestion would be to go look it up, try to figure out how it works, and then you will have learned something. After you have done all of that you will have an idea of what's going on and if you are still stuck you can elaborate with people on the subject, not just ask for free information.

BTW, this was not meant as a flame/insult/etc...
May 19, 2003, 3:53 PM
TheMinistered
I assume you are referring to a Queue which is the exact opposite of a Stack. Stack is LIFO (Last In First Out) and Queue is FIFO (First In First Out)

CQueue
[code]
Dim Queue As Collection

Public Sub Class_Initialize()
Set Queue = new Collection
End Sub

Public Sub Enqueue(ByVal value As Variant)
Queue .Add value
End Sub

Public Function Dequeue() As Variant
Dequeue = Queue .Item(1)
Queue .Remove 1
End Function

Public Function Peek() As Variant
Peek = Queue .Item(1)
End Function

Public Function Count() As Long
Count = Queue .Count
End Function

Public Sub Clear()
Set Queue = New Collection
End Sub

Public Sub Class_Terminate()
Set Queue = Nothing
End Sub
[/code]
Enjoy!
May 20, 2003, 12:55 AM
Fr0z3N
Ok I'll try that im in PEi right now ^.^
May 21, 2003, 12:45 AM

Search