| |
|
|
Michael W. | Übergebe I one aray on a function, then disappears the Content the Arrays to the end the Unterfunktion.
The Unterfunktion is so short as possible held. only one aray suppose and it as Return-worth supplying.
the zurückgegebene aray is then too there, but the übergebene is suddenly empty...
' XProfan X3.1
' 3 dyn. Arrays
Declare long arr_1[], arr_2[], arr_3[]
cls
' Übergabe and Return one Arrays
' (what so employed becomes, is here unwichtig)
Proc Test
parameters long arr[]
return arr[]
endproc
' beget values in the aray 1
arr_1[] = 1,4,17,4,9,8,3,4,17
' copy aray
arr_2[] = arr_1[]
Print "\n-aray 1"
whileloop 0, sizeof(arr_1[]) - 1
print &loop,arr_1[&loop]
endwhile
Print "- *"
Print "\n-aray 2 (watts from array 1 prepares)"
whileloop 0, sizeof(arr_2[]) - 1
print &loop,arr_2[&loop]
endwhile
Print "- *"
waitinput
' create aray 3 (Data from Unterprogramm)
arr_3[] = Test( arr_1[] )
Print "\n-aray 3 (watts from Unterprogramm loaded)"
whileloop 0, sizeof(arr_3[]) - 1
print &loop,arr_3[&loop]
endwhile
Print "- *"
Print "\n-aray 1 (---Nanu---)"
whileloop 0, sizeof(arr_1[]) - 1
print &loop,arr_1[&loop]
endwhile
Print "- *"
waitend
Greeting Michael Wodrich |
|
|
| |
|
|
|
RGH | the I will me time standing. the ought to so naturally not his.
Greeting Roland |
|
|
| XProfan X3Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 02/05/17 ▲ |
|
|
|
|
Jörg Sellmeyer | If that here fixed is, please times on Done settle. |
|
|
| |
|
|