Thursday, December 6, 2007

Differences between version 1 and 2

Other than the addition of several functions ('enqueue', 'dequeue', 'queue_isempty', 'stack_isempty'), the implementation of the queue and stack library has also changed. Previously, all of the functions accepts a string representing the name of the queue or stack; however, in version 2 the functions need to accept the actual array variable directly. I.e.:

Version 1: queue_init ("my_queue");
queue_push ("my_queue", "value1");

Version 2: queue_init (my_queue);
queue_push (my_queue, "value1");
where my_queue is an array. If you need to update from version 1 to version 2 of the library, the quickest way would be to remove the double quotes from the first parameter of all the func_queue_stack function calls.

Can't wait to get your hands on it? Get it here:

No comments: