You never CALL
#11
Hello Betty, for me it is important to clearly show what is happening. The usual exception is when I call a function as an argument to a function, there would be Call be kind of out of place.  Wink

Code: (Select All)
Option _Explicit

Declare Function Nte_Wurzel(n As Double, x As Double) As Double
Declare Function Nte_Potenz(n As Double, x As Double) As Double

Dim As Double n, x

Print
Input "Wurzelexponent: ", n
Input "Radikand      : ", x

Print
Print Using "Die ###.## Wurzel aus ###.## ist: ##.##########"; n, x, Nte_Wurzel(n, x)
Print: Print
Print "Ueberpruefung: Wurzelwert mit demselben Exponenten potenzieren"
Print
Print Using "Wurzelwert ##.########## potenziert mit Exponent ###.## ergibt: ####.######"; Nte_Wurzel(n, x), n, Nte_Potenz(Nte_Wurzel(n, x), n)

End

Function Nte_Wurzel (n As Double, x As Double)

  Dim wurzelx As Double

  wurzelx = x ^ (1 / n)
  Nte_Wurzel = wurzelx
End Function

Function Nte_Potenz (wurzelx As Double, exponent As Double)

  Dim potenz As Double

  potenz = wurzelx ^ exponent
  Nte_Potenz = potenz
End Function
Reply


Messages In This Thread
You never CALL - by Pete - 12-01-2022, 04:37 PM
RE: You never CALL - by bplus - 12-01-2022, 05:05 PM
RE: You never CALL - by Pete - 12-01-2022, 05:18 PM
RE: You never CALL - by bplus - 12-01-2022, 05:22 PM
RE: You never CALL - by CharlieJV - 12-01-2022, 05:58 PM
RE: You never CALL - by James D Jarvis - 12-01-2022, 07:54 PM
RE: You never CALL - by CharlieJV - 12-01-2022, 08:03 PM
RE: You never CALL - by Pete - 12-01-2022, 08:53 PM
RE: You never CALL - by James D Jarvis - 12-01-2022, 09:11 PM
RE: You never CALL - by Pete - 12-01-2022, 09:53 PM
RE: You never CALL - by Kernelpanic - 12-01-2022, 11:16 PM
RE: You never CALL - by mnrvovrfc - 12-02-2022, 12:23 AM
RE: You never CALL - by Pete - 12-01-2022, 11:24 PM
RE: You never CALL - by mnrvovrfc - 12-02-2022, 12:15 AM



Users browsing this thread: 10 Guest(s)