Game Maker Games, Articles, Tutorials & More

Game Maker Network


Howdy, Guest! Please sign in or register an account.

Print

ds_list_repr

By Daniel · December 26, 2008

Returns a string representation of a list in the form [E1, E2, ...]. Useful for debugging.

// ds_list_repr(id)
// Returns a string representation of a list in the form [E1, E2, ...].

var L, size, result, i;

L = argument0;
size = ds_list_size(L);
str = '[';

for (i = 0; i < size; i += 1) {
  if (i > 0)
    str += ', ';
  str += string(ds_list_find_value(L, i));
}

str += ']';
return str;

Comments

There are no comments to display.

Post a Comment

You must be signed in to post comments.

Advertisement