0

I am reading pseudo code for a fundamental linked list and some of the methods have ____.info in them. Here is an example:

Algorithm: ToArray() //Returns an array of items from the list
START
Let Current be a node;
Lat ItemArray be an array of items in the list;
Let X be an integer, initialized to 0; //assume array sub-scripting begins at 0
Current = First;
While(Current <> NULL)
     Increment x by 1;
     ItemArray[x-1] = Current.Info; 
     Current = Current.Next;
End-While;
Return ItemArray;
STOP

What does the .Info do/mean?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Oryx
  • 9
  • 3

1 Answers1

6

Current in your pseudo code seems to be an element of the list. That basically holds the pointer to the Next element and also the actual data at that position. It seems Info is a bad name for exactly that: the actual data at the position in the list represented by Current.

Simon Fischer
  • 1,154
  • 6
  • 22