Last active
October 19, 2016 09:18
-
-
Save PeterWAWood/4caea58080c506b7c5e26984e04828cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red/System [] | |
sphere!: alias struct! [ | |
radius [integer!] | |
] | |
list: declare struct![ | |
item1 [sphere!] | |
item2 [sphere!] | |
item3 [sphere!] | |
] | |
list/item1: declare sphere! | |
list/item2: declare sphere! | |
list/item3: declare sphere! | |
list/item1/radius: 1 | |
list/item2/radius: 2 | |
list/item3/radius: 3 | |
print [as integer! list/item1/radius " " list/item2/radius " " list/item3/radius lf] | |
item: declare sphere! | |
item: list/item1 | |
i: 1 | |
until [ | |
print [i " " item/radius lf] | |
item: item + 1 | |
i: i + 1 | |
i > 3 | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment