| |
|
|
Jörg Sellmeyer | somehow missing me with whom Arraybefehlen one simple ArrAdd. generally would it me rather, if The Arraybefehle functions with Return Value wären.
Proc ArrAdd
If PType$(1) = "$[]"
Parameters Arr$[]',worth$
WhileLoop 2,%pcount
Arr$[SizeOf(Arr$[])] = @$(&Loop)
Wend
Return SizeOf(Arr$[])
ElseIf PType$(1) = "&[]"
Parameters Arr&[],Wert&
WhileLoop 2,%pcount
Arr&[SizeOf(Arr&[])] = @&(&Loop)
Wend
Return SizeOf(Arr&[])
ElseIf PType$(1) = "%[]"
Parameters Arr%[],worth%
ElseIf PType$(1) = "![]"
Parameters Arr![],worth!
EndIf
ENDPROC
Randomize
Declare MyArr&[],MyArr$[]
WhileLoop 0,10
MyArr&[&Loop] = Rnd(1000)
Wend
Window 500,800
Print SizeOf(MyArr&[])
Print
WhileLoop 0,ArrAdd(MyArr&[],2,5000,7)-1
Print MyArr&[&Loop]
Wend
print
WaitInput
print
WhileLoop 0,10
MyArr$[&Loop] = Chr$(Rnd(27) + 65) + Chr$(Rnd(27) + 65)
Wend
Print SizeOf(MyArr$[])
print
WhileLoop 0,ArrAdd(MyArr$[],time$(0),Date$(1),"Test")-1
Print MyArr$[&Loop]
Wend
waitInput
|
|
|
| |
|
|
|
| The übliche manner would:
Roland could from it a&[count(a&)]="Neuer Eintrag" make. |
|
|
| |
|
|
|
RGH | for a ArrAdd To make possible, would it Yes wealthy, the ArrIns so To strain, that the Insert too behind the last element erfolgen can. I know in the momentum not, wozu I a Return Value need.
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 | 06/02/18 ▲ |
|
|
|
|
Jörg Sellmeyer | The Return Value would then simply always the new Size, so one The not again extra inquire must. |
|
|
| |
|
|
|
RGH | I faith not, that it itself rewards, for this Mini-comfort The compatibility To previous versions aufzugeben.
but ex the next Version, must the index with ArrIns too 1 behind the last element lying and then results one ArrAdd.
Greeting Roland
(The Idea had during the Subscriptionsphase To X3 explicit More prospect on success had.) |
|
|
| 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 | 06/02/18 ▲ |
|
|
|
|
Jörg Sellmeyer | During the Subsdings lying I unfortunately größtenteils in the hospital and hadn't whom nerve, me so To befassen
thanks but for install. would be not possible, The pair optional as commands or function to execute? one could itself Yes yourself The pair as function write but then must one in the principle 4 functions create or a function with 4 Unterprogrammen indm one each PType$ abfragt. |
|
|
| |
|
|