beginner list question

BlitzMax Forums/BlitzMax Beginners Area/beginner list question

mudcat(Posted 2005) [#1]
In the Docs,there are two kinds of list commands, functions and methods. I've created a global list:tlist.

how do use either ?the functions and the methods.

thanks,
mudcat


Perturbatio(Posted 2005) [#2]
list.AddLast("my entry")



mudcat(Posted 2005) [#3]
so it's the same?
global list:Tlist

list.remove("my entry") 'Function ListRemove( list:TList,value:Object )

list.remove("my entry") 'Method Remove()

list.addfirst("myentry") 'Method AddFirst:TLink( value:Object )

list.addfirst("myentry") 'Function ListAddFirst:TLink( list:TList,value:Object )


ok thanks
mudcat


FlameDuck(Posted 2005) [#4]
Yeah. Close to 90% of all 'Functions' are really just wrapers for Methods, so people can pretend they aren't programming object oriented.


mudcat(Posted 2005) [#5]
is there an advantage between using these two?
local a=score.list.count()  'method
local a=CountList(score.list) 'function



Who was John Galt?(Posted 2005) [#6]
I would use the method - the function wrapper just adds a small amount of overhead.