02-25-2025, 03:39 PM
This made me want to see what happens when the wrong data type is passed. Nothing happens. Shouldn't there be an error message?
Code: (Select All)
'Beispiel fuer falsche Uebergabe an Prozedur/Funktion - 24. Feb. 2025
Option _Explicit
Declare Function Beispiel(kilowatt As Double) As Double
Dim As Double eingabe
Dim As Integer eingabe1
Print
Print "Kilowatt in PS"
Print: Print
Input "Kilowatt eingeben: ", eingabe1
Print
Print Using "Das sind ###.## PS"; Beispiel(eingabe1)
Function Beispiel (kilowatt As Double)
Dim As Double ps
ps = kilowatt * 1.36
Beispiel = ps
End Function
![[Image: Falscher-Datentyp2025-02-25.jpg]](https://i.ibb.co/jZjmzWb1/Falscher-Datentyp2025-02-25.jpg)