It's not in keeping with the rest of the PureBasic commands.
Most PB commands adhere to a regular syntax:
Code: Select all
CommandName (paramA, paramB, ...)
Code: Select all
--> SetGadgetText(#Gadget, Text$)
--> ToolBarToolTip(#ToolBar, ButtonID, Text$)
--> AddDate(Date, Field, Value)
It makes working with the language easy: you may forget the exact wording of a command, but you never have to struggle with the syntax: it's always the same... or almost !
When it comes to Linked Lists, unexpectedly, things diverge.
Where you expect...
Code: Select all
--> AddElement(Queue(), value)
--> InsertElement(Queue(), value)
you discover a 2-step process:
Code: Select all
AddElement(Queue()) ; create the element in memory
Queue() = value ; give it a vakue
InsertElement(Queue())
Queue() = value
It would be great if the syntax of those 2 commands was normalized in the usual PB way.
As well, i'd like to point out an omission in the Help file index:
the NewList command does not appear in the list of available commands under the LinkedList section.