Array length: Difference between revisions

Content added Content deleted
(→‎{{header|FutureBasic}}: Added 'len' keyword option)
Line 1,534: Line 1,534:
HandleEvents
HandleEvents
</syntaxhighlight>
</syntaxhighlight>

We can also use FB's len() function to get the length of an array.
<syntaxhighlight lang="futurebasic">
void local fn DoIt
CFArrayRef array = @[@"apple",@"orange",@"cherry",@"grape",@"lemon"]
print len(array)
end fn

fn DoIt

HandleEvents
</syntaxhighlight>

{{out}}
{{out}}
<pre>
<pre>