By Pureferret

2011-12-05 11:11:08 8 Comments

My program is running though 3D array, labelling 'clusters' that it finds and then doing some checks to see if any neighbouring clusters have a label higher than the current cluster. There's a second array that holds the 'proper' cluster label. If it finds that the nth adjoining cluster is labelled correctly, that element is assigned to 0, otherwise is assigns it to the correct label (for instance if the nth site has label 2, and a neighbour is labeled 3, the 3rd element of the labelArray is set to 2). I've got a good reason to do this, honest!

All I want is to be able to assign the nth element of the labelArray on the fly. I've looked at allocatable arrays and declaring things as labelArray(*) but I don't really understand these, despite searching the web, and StackOverflow.

So any help on doing this would be awesome.

Related Questions

Sponsored Content

98 Answered Questions

[SOLVED] How can I remove a specific item from an array?

  • 2011-04-23 22:17:18
  • Walker
  • 7149566 View
  • 8665 Score
  • 98 Answer
  • Tags:   javascript arrays

30 Answered Questions

[SOLVED] How to append something to an array?

38 Answered Questions

[SOLVED] Create ArrayList from array

40 Answered Questions

[SOLVED] Loop through an array in JavaScript

19 Answered Questions

[SOLVED] How to insert an item into an array at a specific index (JavaScript)?

54 Answered Questions

47 Answered Questions

[SOLVED] Sort array of objects by string property value

49 Answered Questions

[SOLVED] How to check if an object is an array?

40 Answered Questions

[SOLVED] For-each over an array in JavaScript

18 Answered Questions

[SOLVED] How do I empty an array in JavaScript?

  • 2009-08-05 09:08:39
  • akano1
  • 2803568 View
  • 2197 Score
  • 18 Answer
  • Tags:   javascript arrays

Sponsored Content