Howto:Start using vectors and hashes in Nasal: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 82: Line 82:


The same thing can be accomplished using the forindex loop:
The same thing can be accomplished using the forindex loop:


<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
var waypoints = ["wp1","wp2","wp3","wp4","wp5"];
var waypoints = ["wp1","wp2","wp3","wp4","wp5"];
forindex(index; waypoints) {
forindex(var index; waypoints) {
  print(waypoints[index]);
  print(waypoints[index]);
}
}

Navigation menu