beginner list question
BlitzMax Forums/BlitzMax Beginners Area/beginner list question| 
 | ||
| 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 | 
| 
 | ||
| list.AddLast("my entry") | 
| 
 | ||
| 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 | 
| 
 | ||
| Yeah. Close to 90% of all 'Functions' are really just wrapers for Methods, so people can pretend they aren't programming object oriented. | 
| 
 | ||
| is there an advantage between using these two? local a=score.list.count() 'method local a=CountList(score.list) 'function | 
| 
 | ||
| I would use the method - the function wrapper just adds a small amount of overhead. |