Array length: Difference between revisions
→{{header|FutureBasic}}
Puppydrum64 (talk | contribs) |
|||
Line 1,494:
<lang futurebasic>
local fn DoIt
CFArrayRef fruits = @[@"apples",@"bananas",@"cherries",@"dates",@"grapes",@"lemon",@"lime",@"orange",@"peach",@"pear",@"pineapple",@"strawberries",@"watermelon"]▼
for i = 0 to ubound - 1▼
printf @"Fruit %ld = %@",i,fruits[i]
next▼
end fn
window 1
fn DoIt
HandleEvents
▲dim as CFIndex ubound, i
▲fruits = @"apples,bananas,cherries,dates,grapes,lemon,lime,orange,peach,pear,pineapple,strawberries,watermelon"
▲ubound = fn CFArrayGetCount( array )
▲for i = 0 to ubound - 1
▲next
</lang>
Output:
|