English
Regulars table & Café

Break or not break...

 

Clemens
Meier
[quote:4a8af8dee1=Frank Abbing]Ersparniss: an row...[/quote:4a8af8dee1]
From because of a row, under Umständen erspart one itself integral More, there one first once a Flag settle must, circa in the While-Loop to stay and naturally must one whom Flag zurücksetzen, circa again from the Loop out To come. The detour over
CompileMarkSeparation
ende% = 0

While not(ende%)

    if ()

        ende% = 1

    endif

XProfan 9.1; XP SP2; FF; Editpad
04/22/06  
 




Frank
Abbing
[quote:fbfd3c2763]From because of a row, under Umständen erspart one itself integral More, there one first once a Flag settle must, circa in the While-Loop to stay and naturally must one whom Flag zurücksetzen, circa again from the Loop out To come. The detour over
CompileMarkSeparation
Ende% = 0

While Not(Ende%)

    If ()

        Ende% = 1

    Endif

CompileMarkSeparation
 
04/22/06  
 




Clemens
Meier
@Frank
with the Case is it often not alone done and eachone Break is a Zwangsabbruch. but above could we now a own Thread eröffnen and diskutieren. The reason of/ one While-Loop ought to near with the While to find his, there otherwise the View source unleserlich becomes. The eleganteste Solution is even The Zuweisung directly at While, especially since with of/ one Zuweisung at the same time with True and False fixes go could, whether The Zuweisung at all successful was. was tappt im dunkeln not successful, becomes The While-Loop first none go through. our Programmierlehrer had to a structure How your said: this is as an box round the ears To distribute, circa first subsequently to the reason to search.
 
XProfan 9.1; XP SP2; FF; Editpad
04/22/06  
 




Frank
Abbing
now Better get going still offtopic...

[quote:207333087e]...eachone Break is a Zwangsabbruch... our Programmierlehrer had to a structure How your said: this is as an box round the ears To distribute, circa first subsequently to the reason to search. [/quote:207333087e]
no discontinue, separate one plunge to a others Programmadresse. of my Erachtens to The effektivste Solution.
the leave of/ one Loop by a Variable is slow and fehleranfällig, because ggf. following Programmteile not any more carryed out go can, once The Scheife exits go should. it could means further If-EndIf inquire necessary his, The a code ditto unübersichtlich make.
I personally write my code in lower case, where eachone Silbenanfang with a Grossbuchstaben begins. Z.B. EndIf or EndWhile. BREAK, CONTINUE, RETURN and if need be GOTO write I but complete in Grossbuchstaben, so tappt im dunkeln in the code very strike. is even my method, around the Überblick not To lose.

circa good programs To write, needed it none stare Limitierungen the Source code. I stops it for importent, its own Style to find and on it herumzufeilen, To it yourself as optimal felt becomes. One thoroughly langwieriger To never endenwollender Process.
and... teacher were me always unsympathisch. Dietmar horn except
 
04/22/06  
 



mustard:

Franks Break is optimal.

@Roland: gives it situations in them one Break  in the XProfan10 not called go ought to - or. can bedenkenfrei from eachone Loop and if-structure gebreakt go? (How behave itself with Continue  and Return ?)
 
04/23/06  
 




RGH
[quote:7956377d64=iF]@Roland: gives it situations in them one Break  in the XProfan10 not called go ought to - or. can bedenkenfrei from eachone Loop and if-structure gebreakt go? (How behave itself with Continue  and Return ?)[/quote:7956377d64]
Hi,
with the Betrachtung must we Return  extra treat.

first of all To Break  and Continue :
Optimal standing one Break  or Continue  outside of/ one IF -structure behind one Case . but self within of/ one IF -structure would it only Extremfall with very unstrukturierter Programming to Error Message To deep IF/ENDIF-Verschachtelung lead. (I bezweifele, that these Error Message apiece of/ one To face get, unless it provoziert the integrally aware. one should ca. 10 millions time a IF-structure mittendrin with BREAK  leave, without The procedure, in the the happens, ever To leave. at that leave of/ one procedure, be it with ENDPROC  or RETURN , go any Stacks on the status to entering into procedure shelved, so that everything, what in the procedure happened, forget and give away is.)

One Return  can really without each Einschränkung everywhere in the procedure stand. The procedure becomes leave and the Stack again tidy aufgeräumt. naturally ought to one in the eye keep, that begot Objects (Fonts, Bitmaps, Icons) again DELETEOBJECT  deleted ud geDIM th reaches before again DISPOSE d go. The begot reaches occupy otherwise until End of program memory and the three named Objects unfortunately yet moreover (but only right little). to all, if is a procedure very often aufruft, can the rasch To unerwünschten side-effects lead.

Greeting
Roland
 
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
04/23/06  
 



so can works...
 
04/23/06  
 




Joerg
Hello together,

@Roland: The Posting Although already 10 years old, but me interested, whether with the whom actually XProfan versions yet very so is, that the Stack aufgeräumt becomes, if is a procedure vorzeitig with Return or Endproc leave...

thanks and Regards!!
Jörg
 
06/27/16  
 




RGH
Yes, there has nothing changed!
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/27/16  
 




Joerg
...lovely! thanks you!!

greetings!
Jörg
 
06/27/16  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

11.167 Views

Untitledvor 0 min.
RudiB.04/29/20
lange-jens10/12/19
Herby07/31/19
Dieter Zornow09/05/16
More...

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