English
Bugs and vermeintliche

XProfan X2

any terms in If-Elseif-Else-Endif go called, alike whether meaningfully or not.

 

Nico
Madysa

CompileMarkSeparation
proc Test

    inc counter
    return 1

endproc

var int counter = 0
var int branch = 0

if Test()

    branch = 1

elseif Test()

    branch = 2

elseif Test()

    branch = 3

else

    branch = 4

endif

print "Abgearbeiteter Zweig:", branch
print "Aufrufe Test:", counter
waitinput
end



the XProfans boolsche Operators no Kurzschlussauswertung [...]  make, is a thing.
but I do not once something How the following write can, power The work with XProfan really unnecessary tricky.
CompileMarkSeparation

11 kB
Hochgeladen:02/23/14
Downloadcounter180
Download
 
02/23/14  
 




Michael
Wodrich
Öhhhmm

If one sowohl in the IF-part as well as in all others Zweigen whom equal worth using, then would too I in that skid come...

and with Funktionsaufrufen missing XProfan integrally evident The Glaskugel - means Call and look what thereby out comes...

which Programming-Language goes because here differently to - and How very...

Greeting
Michael Wodrich
CompileMarkSeparation
XProfan X2
Windows (TM) Vista Ultimate, Core(TM) i7 920 @ 2.67GHz, 9206,26 MB

Programmieren, das spannendste Detektivspiel der Welt.
02/24/14  
 




Michael
Wodrich
Wow,
but the electrician must there really time ran...
CompileMarkSeparation
' kurzschluss
var int A = 0
var int B = 10

if (A <> 0) and ((B / A) >= 5)

    messagebox("An dieser Stelle im Algorithmus konnte B durch A geteilt werden.","Erfolg",0)

else

    messagebox("An dieser Stelle ist der Quotient (B / A) echt kleiner als 5 oder eine Division durch 0 wurde verhindert","F E H L E R",0)

endif

XProfan X2
Windows (TM) Vista Ultimate, Core(TM) i7 920 @ 2.67GHz, 9206,26 MB

Programmieren, das spannendste Detektivspiel der Welt.
02/24/14  
 




Nico
Madysa
Hello Michael,

so quite each Language, The me spontan falls in, lead The expressions in a elseif-sprig only from, if any expressions before it wrong yield having.

with whom C-artigen Languages is the automatically the case, because its elseif Yes straight nothing other as nested Ifs are.

have too even Python tested:
a = 0
if a == 0:
	print "Division durch Null verboten!"
elif 3 / a > 8:
	print "Dieser Zweig wird nie erreicht, da a Null

crashes not ex. there The first circumstance already erfüllt is, becomes the second none first tested. the Analog Gegenstück under XProfan crashes with a Division-through-zero-Error ex.
 
02/24/14  
 




Michael
Wodrich
here operates XProfan means very differently around as C:

- with whom If-ElseIf falls XProfan through to that next block
- and with whom Select-Case is this at C the case
(therefore must there in the block always with BREAK gestoppt go)

as long as The terms completely different are, falls it indeed niemandem on, that here something from the helms runs.

In gewollter shape ought to this but only whom singlelined CASE(NOT) so his - here can then several similar or same Cases abgehandelt go.

Roland hat's itself already durchgelesen...
 
XProfan X2
Windows (TM) Vista Ultimate, Core(TM) i7 920 @ 2.67GHz, 9206,26 MB

Programmieren, das spannendste Detektivspiel der Welt.
02/25/14  
 




RGH
Hi,
even if to one erfolgreichen IF the comparison at darauffolgenden ELSEIF objectively once more carryed out becomes, becomes it nevertheless not ausgewertet. that is, the program behave itself How expects and lead only whom code to the first erfolgreichen comparison from:
CompileMarkSeparation
if 5 = 5

    print "5=5"

elseif 6 = 6

    print "sechs"

else

    print "nix"

endif

XProfan X2
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
02/25/14  
 




Nico
Madysa
Hello Roland,

that from the suitable Befehlsblöcke only the first carryed out becomes, which circumstance zutrifft, is self-evident.
everything others would Yes really one scandal.

what it me plenty More goes, is, when very The terms ausgewertet go. this is in two situations important:

1. If a function in the circumstance standing, The any side-effects has.
CompileMarkSeparation
if SomeAPICall()' gibt 0 aus, falls was schief gegangen ist.

    print "Juchuu, alles in Ordnung!"

elseif MessageBox("Hat nicht geklappt. Beenden?", "", ~MB_YESNO) = ~IDNO

    print "Trotz Fehler weitermachen."

else

    print "Programm wird beendet."
    end

CompileMarkSeparation
functions in XProfan not.

concise and well: In If-Elseif-Structures stops I it for very  meaningfully, any further terms To ignore, once a true yields.

with boolschen Operators stops I it too for meaningfully, but since can The opinions different his.

important is only, that The Documentation somewhere erwähnt, How XProfan itself behave. so one not Dark tapst.
 
02/25/14  
 




RGH
Yes, presently evaluates XProfan objectively too The others terms from. But this is always so been, even if it in the didn't necessary is and differently even presumably something flotter would. (the power whom entspechenden Delphi-code in XProfan hold explicit plainer. Sorry.)
here's a Änderung but sure possible.
though stops I code, the deratige functions with "Nebenwirkungen" in terms or Boolschen squeeze out contains not for sonderlich clear.

to the Boolschen Operators: In Delphi can objectively by Compilerschalter take on, whether always any Argumente ausgewertet go or only so far, To the Result feststeht. I have it always on "alle Argumente" tuned and XProfan is it too so realized.
but here would it sure possible, both mutants anzubieten.

I try time, me both items for coming Version X3 To remember.

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
02/25/14  
 




Nico
Madysa
everything clear, thanks for speedy response. How already said, letztendlich are both Vorgehensweisen (complete and Kurzschlussauswertung) gangbare Alternativen. but important is hold, that the Programmer too somewhere above aufgeklärt becomes.

Sincerely,

Nico
 
02/26/14  
 




RGH
... and the thing with the ELSEIF becomes in the next XProfan-Version (X3) and FreeProfan korrigiert! once one sprig erfüllt watts, go The übrigen terms not any more quizzed.

Greeting
Roland
 
XProfan X2
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
02/26/14  
 




Nico
Madysa
Vergiss not, the same behaviour too for Select incorporate. has of course utterly zero Anwendungsorientierung, but the latest, what we need, are yet More Inkonsistenzen.
 
02/26/14  
 




RGH
... and with SELECT now properly adjusted!

Greeting
Roland
 
XProfan X2
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
09/25/14  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

20.194 Views

Untitledvor 0 min.
Sven Bader07/05/21
p.specht06/09/21
Joerg06/15/16
Wilfried05/21/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