English
Forum

For to step Do ...

 
Hi,
Have strain The Syntax-extensions in the xpse-Description tested,
come but with the beschriebenen
For ... to... step .. do
not clear. or was a announcement for next Version?
it'll one fehlendes Begin angemotzt...
where heard the there, and How finish I the block? EndFor ??
 
08/21/08  
 



for x=0 to 200 do begin
blub
end

or

for x=0 to 200 step 20 do begin
blub
end

for x=200 downto 0 do begin
blub
end

...
 
08/22/08  
 




Jörg
Sellmeyer
where one dazusagen must, that XPSE there too nothing other as The good old WhileLoop-Loop out power:
CompileMarkSeparation
WhileLoop 0, 200

    Blub()

Wend

WhileLoop 0,200,20

    Blub()

Wend

WhileLoop 200,0,-1

    Blub()

Wend

 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/22/08  
 




Frank
Abbing
Yes, its spelling plenty kürzer and simpler is...
... even if to that Schluss rather one EndWhile there stalls!
 
08/22/08  
 



ähm... thanks, but with a naked X goes there garnix, can itself neither declaren. It's all right by me but from others Found neither, at least not often:

{$iq}
declare x&
for x& = 0 to 200 step 20 do begin
print "0";
end
for x& = 0 to 200 step 20 do begin
print "1";
end
waitinput
end

...supply a Error Message in the .xpia File, The one undeclaretes INC concerns.
Perhaps likes the Precompiler the Semikolon not - but i beg your pardon? bring I then The Digits together ran, without first tricky a Sammelstring with + aufzubauen? meanwhile kenn I of course whom MkStr$()-commands, but it's about The prinzipielle application of ";" How in the good middle-aged BASIC
greeting
P. woodpecker
 
08/22/08  
 



XPSE power there at all quite no WhileLoop-creep draus. How ought to one because so with of/ one Variable (z.B. X) count can, and the too nested. "Wegen" XProfan11 has XPSE in the reference on The ForSchleifen strain a BUG, these "INC-Meldung" The You there ansprichst must I first correct. the Semikolon is no trouble. See  [...]  or.  [...] 

If I again back be, so Have ichs Yes promised, Gibts naturally zeitnah one Update. (but first to unpack of my toothbrush.)
 
08/22/08  
 




Jörg
Sellmeyer
How one here beautiful sees, are the two last WhileLoop-mutants faster. against it is the simple WhileLoop-Loop slower as The of XPSE created While-Loop.
I had sooner the contrary vermutet.
CompileMarkSeparation
 $IFNDEF INTERPRETER
 {$cleq}
 $ENDIF
ClearClip
Set("Decimals", 0)
Declare x&
Cls
Sleep 3000
Var c& = &GetTickCount
for x&=0 to 10000 do begin
Locate 1,1:print x&
end
C& = &GetTickCount - c&
print c&
PutClip Str$(c&) + "
"
c& = &GetTickCount
for x&=0 to 10000 step 1 do begin
Locate 4,1:print x&
end
C& = &GetTickCount - c&
print c&
PutClip Str$(c&) + "
"
c& = &GetTickCount
for x&=10000 downto 0 do begin
Locate 7,1:print x&
end
C& = &GetTickCount - c&
print c&
PutClip Str$(c&) + "
"
Print "###############################"
c& = &GetTickCount

WhileLoop x&, 10000

    Locate 10,1:print &Loop

Wend

C& = &GetTickCount - c&
print c&
PutClip Str$(c&) + "
"
c& = &GetTickCount

WhileLoop x&,10000,1

    Locate 13,1:print &Loop

Wend

C& = &GetTickCount - c&
print c&
PutClip Str$(c&) + "
"
c& = &GetTickCount

WhileLoop 10000,x&,-1

    Locate 16,1:print &Loop

Wend

C& = &GetTickCount - c&
print c&
PutClip Str$(c&) + "
"
='./../../references-fonction/XProfan/waitinput/'>WaitInput


Results:
1922
2578
2578
2484
2469
2484

The Greenbox wished I still too time place

[offtopic]
Why sees The because so strange from?

[/offtopic]



Results: 1922 2578 2578 2484 2469 2484
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/22/08  
 




Frank
Abbing
the Testprogramm ought to first any Laufwerksaktivitäten to wait it out, where one vorangestelltes Sleep 3000 ungemein helps. here my (abweichendes) Result, where any XPSE-creep slower works:

1140
1110
1093
####
1047
1094
1047
 
08/22/08  
 




Jörg
Sellmeyer
Wow! what have Thou for a computer. I thought my new Intel Dualcore 4600 @2.4GH would quick. my Results now:
2547
2578
2547
2468
2469
2453

are but some Schwankungen drin:
2578

1859

2531

2469

2453

2469


particularly iFs first Loop becomes slower, if the Mainwindow to the first Print already there's. would have been so did i not calculated...
I Have Sleep and Cls time installed.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/22/08  
 




Frank
Abbing
Hüstel, my oller AMD Athlon 64 with 2.2 GHz and 1 GB RAM is already almost antique...
 
08/22/08  
 



knows not, Why my mill today so slow is...
From 3,4 GHz HT is anyway nothing To remember:
2907
2906
2891
####
2797
2812
2813

means The ENDs the BEGIN blöcke fallen me none. with END think I always on whom last compilierten commands. How wärs with FEND with For-creep? or BEND for BLOCK-END? Gibts others Einsatzmöglichkeiten for BEGIN, or heard the to FOR-Loop?

greeting
 
08/22/08  
 




Frank
Abbing
Naheliegender would Perhaps Next been...
 
08/22/08  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

16.792 Views

Untitledvor 0 min.
p.specht08/21/18
lange-jens05/22/12
Roland Schäffer01/06/11

Themeninformationen



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