Scripting in GH Part 03

Software: 
Tag: 
Video Duration: 
9 minutes
Author: 
Zach Downey

In part 3 we step away from geometry and talk about constructing lists and loops.  We start by defining an empty list called numbers and then add items to that list by "hand." The we create a for loop to add incrementing values to that list.

//Define a new List called numbers of type int
List<int> numbers = new List<int>();
 
// for (initialization-clause; condition-clause; iteration-clause) { statement-block; }
for (int i = 0; i < 10; i++) {
numbers.Add(i);
} 
 
A = numbers;

Rating

Please rate this tutorial below. Thanks.

5
Average: 5 (4 votes)

Comments

When I hit button".". I don't have drop-down list with "add". 02:32 time in Your tutorial. Help please.

Want to Contribute?

Want to be an author? Drop us a line here we'd love to have you.

Already have a video you'd like to post? Send us a link and we'll get you going.

:)