English
Opportunities and suggestions

Proposals for future versions

ex Version X5

Arraybefehle ArrAdd

 

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
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/02/18  
 



The übliche manner would:
a&[]="Neuer Eintrag"

Roland could from it a&[count(a&)]="Neuer Eintrag" make.
 
06/02/18  
 




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 X3
Intel 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.
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/02/18  
 




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 X3
Intel 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.
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/02/18  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.516 Views

Untitledvor 0 min.
H.Brill10/12/22
Stringray01/05/22
Michael W.05/31/20
Jörg Sellmeyer05/28/20
More...

Themeninformationen

this Topic has 3 subscriber:

Jörg Sellmeyer (3x)
RGH (2x)
iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie