English
Bugs and vermeintliche

actually Version: XProfan X4

Var and Stringarray

 

Jörg
Sellmeyer
the example from the Help not working, if to the aray with Var declared.
CLS
var Test$ = "Das is a Test"
Var A$[] = Explode(Test$, " ")

WhileLoop 0, SizeOf(A $[]) - 1

    Print A$[&loop]

EndWhile

WaitInput
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
05/14/18  
 




Jörg
Sellmeyer
I ergänz the time, in the hope, that the in the next Version somehow fixed becomes.
The Zuweisung by Var functions of course, if directly Strings transfer go but not, if with Explode a String function to that stuff the Arrays is used.
CLS
Declare aTest$[]
var Test$ = "Das is a Test"
aTest$[] = Explode(test $," ")
Var String aTest2[] = Explode(Test$, " ")
Var String names[] = "Maria", "Karl", "Herbert","Heinrich"
print SizeOf(aTest2[])
Print aTest2[0]'here shining only The Number of Teilstrings anzukommen
print

WhileLoop 0, SizeOf(names[]) - 1

    Case SizeOf(aTest$[]) > 0:Print aTest$[&loop]
    Case SizeOf(aTest2[]) > 1:Print aTest2[&loop]
    Case SizeOf(names[]) > 0:Print names[&loop]
    Print

EndWhile

WaitInput
 
XProfan X4
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/23/20  
 




Michael
W.
In ever one Forenbeitrag stood time, that here "nur static Werte" allocated go can.
with my Tests went but so some moreover.

though have I the always in the Oberstübchen keep and, if something not klappte, again on old umgestellt.

very How with PType$(), the its values to the first Funktionsaufruf lose. Yes, sometime happens the - but never at first Funktionsaufruf.
my Workaround with PType:

Declare int cnt,string PT
cnt = %PCount
PT = ""
WhileLoop 1,cnt
PT = PT + if(&loop>1,"|","") + PType$(&loop)
EndWhile

'the whole as Einzeiler into functions where I different Parameterlisten need
Declare int cnt,string PT:cnt = %PCount:PT = "":WhileLoop 1,cnt:PT = PT + if(&loop>1,"|","") + PType$(&loop):EndWhile
'then have I with SubStr$(PT,paridx,"|") the value parat.

and the old shape with Var is hold The Aufteilung in Deklaration and Zuweisung.
 
System: Windows 8/10, XProfan X4
Programmieren, das spannendste Detektivspiel der Welt.
06/27/20  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.060 Views

Untitledvor 0 min.
ScanMaster06/25/24
RudiB.11/15/21
p.specht12/10/20
N.Art11/18/20
More...

Themeninformationen

this Topic has 2 subscriber:

Jörg Sellmeyer (2x)
Michael W. (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