Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Array-length/PureBasic/array-length-1.basic
Normal file
12
Task/Array-length/PureBasic/array-length-1.basic
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
4
Task/Array-length/PureBasic/array-length-2.basic
Normal file
4
Task/Array-length/PureBasic/array-length-2.basic
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Dim fruit$(1); defines array with 2 elements at indices 0 and 1
|
||||
fruit$(0) = "apple"
|
||||
fruit$(1) = "orange"
|
||||
Debug ArraySize(fruit$()) + 1 ;the number of elements is equal to the size + 1. For example: Dim a(2) contains 3 elements from a(0) to a(2) for a size of 2.
|
||||
Loading…
Add table
Add a link
Reference in a new issue