Array length: Difference between revisions
Content deleted Content added
Line 1,152: | Line 1,152: | ||
yes</lang> |
yes</lang> |
||
=={{header|PureBasic}}== |
|||
<lang PureBasic> |
|||
EnableExplicit |
|||
Define Dim fruit$(1); defines array with 2 elements at indices 0 and 1 |
|||
fruit$(0) = "apple" |
|||
fruit$(1) = "orange" |
|||
Define length = ArraySize(fruit$()) + 1; including the element at index 0 |
|||
If OpenConsole() |
|||
PrintN("The length of the fruit array is " + length) |
|||
PrintN("") |
|||
PrintN("Press any key to close the console") |
|||
Repeat: Delay(10) : Until Inkey() <> "" |
|||
CloseConsole() |
|||
EndIf |
|||
</lang> |
|||
=={{header|Python}}== |
=={{header|Python}}== |