| |
|
|
- Page 1 - |
|
Gary12345 | Hi,
I have a Include based on leichtem XPROFAN code prepares.
Download
functions from the code ablesbar! |
|
|
| |
|
|
| |
|
- Page 3 - |
|
|
Julian Schmidt | what in the Context of Quadratischen functions yet interestingly would, is the Berechnung the Scheitelpunktes. Diesen can you over The Quadratische appendix or over the story the Nullstellen and anschließenden einsetzten for X calculate. |
|
|
| |
|
|
|
Gary12345 | there are we straight in the Matheunterricht
sooner not. I have a plan, I einbaue and the I will first durchnehmen, what then becomes, white I not yet eindeutig. |
|
|
| |
|
|
|
Gary12345 | Hi,
derzeitiger code: CompileMarkSeparation'Include programmiert von Gary12345
Proc Summe
parameters a!,b!
declare Summe!
set("decimals",2)
Summe! = a!+b!
return ROUND(Summe!,2)
EndProc
Proc Info'Muss noch weiter ausgebaut werden!
print "Summe: Addiert zwei Zahlen. Summe(a,b). Es werden a und b miteinander addiert.a+b=Ergebnis"
print ""
print "Minus: Subtrahiert zwei Zahlen. Minus(a,b). Es werden a und b miteinander subtrahiert.a-b=Ergebnis"
print ""
print "Teilen: Teilt zwei Zahlen. Fehler bei Divison durch 0. Teilen(a,b). a wird durch b geteil.a:b=Ergebnis"
print ""
print "Multiplizieren: Multipliziert zwei Zahlen. Multiplizieren(a,b). Es werden a und b miteinander multipliziert.a*b=Ergebnis"
print ""
EndProc
Proc Minus
parameters a!,b!
declare Minus!
set("decimals",2)
Minus! = a!-b!
return ROUND(Minus!,2)
EndProc
Proc Teilen
parameters a!,b!
declare Teilen!
set("decimals",2)
Teilen! = a!/b!
return ROUND(Teilen!,2)
EndProc
Proc Multiplizieren
parameters a!,b!
declare multiplizieren!
set("decimals",2)
multiplizieren! = a!*b!
return ROUND(Multiplizieren!,2)
EndProc
Proc Wurzel
parameters a!
declare Wurzel!
set("decimals",2)
Wurzel! = sqrt(a!)
return Round(Wurzel!,2)
EndProc
Proc ADreieck
parameters a!,b!
declare ADreieck!
set("decimals",2)
ADreieck! = 0.5*a!*b!
return ROUND(ADreieck!,2)
EndProc
Proc AQuadrat
parameters a!
declare Quadrat!
set("decimals",2)
Quadrat!=a!*a!
return ROUND(Quadrat!,2)
EndProc
Proc ARechteck
parameters a!,b!
declare Rechteck!
set("decimals",2)
Rechteck! = a!*b!
return ROUND(Rechteck!,2)
EndProc
Proc AKreis
parameters a!
declare Kreis!
set("decimals",2)
Kreis! = @Pi()*a!
return ROUND(Kreis!,2)
EndProc
Proc ATrapez
parameters a!,c!,h!'Trapezformel: 0.5*(a+c)*höhe! (h!)
declare Trapez!
set("decimals",2)
Trapez! = 0.5*(a!+c!)*h!
return ROUND(Trapez!,2)
EndProc
Proc AParallelogramm
parameters g!,h!
declare Parallelogramm!
set("decimals",2)
Parallelogramm! = g!*h!'Grundfläche*Höhe
return ROUND(Parallelogramm!,2)
EndProc
Proc VWürfel
Parameters a!
declare Würfel!
set("decimals",2)
Würfel! = a!*a!*a!
return ROUND(Würfel!,2)
EndProc
Proc VQuader
Parameters a!,b!,c!
declare Quader!
set("decimals",2)
Quader! = a!*b!*c!
return ROUND(Quader!,2)
EndProc
Proc VKugel
parameters r!
declare Kugel!
set("decimals",2)
Kugel! = 4/3*@PI()*r!*r!*r!
return ROUND(Kugel!,2)
EndProc
Proc VKegel
parameters r!,h!
declare Kegel!
set("decimals",2)
Kegel! = 1/3*@PI()*r!*r!*h!
return ROUND(Kegel!,2)
EndProc
Proc Lösungsformel1'Wert bei -b-...
parameters a!,b!,c!
set("decimals",2)
var Lösungsformel1! = -((b!/a!)/2)+sqrt(abs(((b!/a!)/2)^2-(c!/a!)))
var Lösungsformel2! = -((b!/a!)/2)-sqrt(abs(((b!/a!)/2)^2-(c!/a!)))
return Str$(ROUND(Lösungsformel1!,2))+" | "+Str$(ROUND(Lösungsformel2!,2))
EndProc
Proc Höhensatz
parameters p!,q!
declare Höhensatz!
set("decimals",2)
Höhensatz! = p!*q!'p*q=h²
return ROUND(sqrt(Höhensatz!),2)
EndProc
Proc Hypothenusensatz
parameters a!,b!
declare c!
set("decimals",2)
c!=b!*b!+a!*a!
return ROUND(sqrt(c!),2)
EndProc
Proc Kathetensatz1
parameters p!,c!
declare b!
set("decimals",2)
b!=c!*p!
return ROUND(sqrt(b!),2)
EndProc
Proc Kathetensatz2
parameters q!,c!
declare a!
set("decimals",2)
a!=c!*q!
return ROUND(sqrt(a!),2)
EndProc
Proc VPrisma
parameters g!,h!
declare v!
set("decimals",2)
v! = g!*h!'Grundfläche*Höhe!
return ROUND(v!,2)
EndProc
Proc VZylinder
parameters r!,h!
declare v!
set("decimals",2)
v! = @pi()*r!*r!*h!
return ROUND(v!,2)
EndProc
cls
var test1! = Lösungsformel1(2,3,-4)
var test2! = Höhensatz(6,7)'p*q=h²
var test3! = Hypothenusensatz(2,3)
var test4! = Kathetensatz1(4,2)
var test5! = Kathetensatz2(4,2)
var test6! = VPrisma(2,4)
var test7! = VZylinder(2,3)
print test1!
print test2!
print sqrt(42)
print test3!
print sqrt(13)
print test4!
print sqrt(8)
p a> Test5!
print Test6!
print Test7!
WaitInput
OK-have now any functions installed, The I gladly having would like (shining too To functions).
a globale Fehlervariable How mErr& To use.
what's this thing? in the Help find I nothing?
LG |
|
|
| |
|
|
|
Julian Schmidt | simply a globale Variable in the You any ? Happen? To Fehlern save. integrally supra simply by declare mErr& deklarieren.
into routines then The Error in these new Variable write. has the benefit that you integrally simply to whom Perform and on eachone place the Program to check on can, whether The latest mathematical operation successful was. because it often or. always with one Error none makes sense try moreover To calculate. The Variable in eachone routine first on Standart zurücksetzen! CompileMarkSeparation |
|
|
| |
|
|
|
Julian Schmidt | time a couple small suggestions and Tipps To your Include.
1. can you your whole Texts from the Info-routine directly in The concerned routine as comment write. comments go simply with ' or // began. 2. should in a gutem Matheinclude The Funktionsnamen too to whom right mathematischen Begriffen benannt his. about instead of sharing, divide. under Umständen should even The Parameter others benannt go. in the routine "Teilen" in example Dividende and Divisor. thereby ought to one but weigh whether the code therefore badly readable and is therefore evtl. to gängigen Abkürzungen search. 3. with volume of Körpern is the Öberfläche not far. |
|
|
| |
|
|
|
Gary12345 | no trouble, becomes everything made.
only a problem to the others trouble
I versteh not Why "If mErr& = 1". Why = 1? i will still inquire, whether negatives values present are?
what about me should then useful everywhere The Fehlervariable with clear in all Procs deklarieren?
LG |
|
|
| |
|
|
|
Julian Schmidt | gary12345 (30.01.13)
I versteh not Why "If mErr& = 1". Why = 1? i will still inquire, whether negatives values present are?
The worth 1 is more or less willkürlich. with the row CompileMarkSeparation examine You, whether the worth in the root negative is, and if so becomes The Fehlervariable mErr& same 1 staid. You could means just as CompileMarkSeparation write. whom worth one have I as Flag for Error negatives root chosen. You could for others Error in the Procedur yet others ? Happen? give away. Z.B. if the case Division through zero vorkommt, for this mErr&=2. No Error would here mErr&=0. now can You by IF simply inquire whether no Error (mErr&=0), one Error (mErr&<>0), or. which Error aufgetreten is (mErr&=1 or mErr&=2)
gary12345 (30.01.13)
what about me should then useful everywhere The Fehlervariable with clear in all Procs deklarieren?
The Variable is with Clear not declared, separate reset. can also simply mErr& = 0 write. is necessary, there at erfolgreichen Durchlaufen (without Error) otherwise teh folks Error values stand stayed |
|
|
| |
|
|
|
Gary12345 | CompileMarkSeparation then ought to this but weg? but it comes before it still The Fehlermelung. with Clear have I The Variable Yes reset...
Thank you! |
|
|
| |
|
|
|
Julian Schmidt | there have you got The incorrect Order. You must first whom Error with If-inquire and if one Error appears from the function jumping z.B. with return. The Error Message comes always with a Math-Error and then stützt the program ex. Probier at next time simply with Einzelschritt-mode on The Solution To come. lead You simply by Traceon at the beginning the routine\Program from and closes You again by Traceoff |
|
|
| |
|
|
|
Gary12345 | |
|
| |
|
|
|
Gary12345 | |
|
| |
|
|
|
Julian Schmidt | No i'd say sooner so CompileMarkSeparation On take off a Error want You with ADreieck Verify? with the Multiplikation there really no Math-Errors. |
|
|
| |
|
|