RosettaCodeData/Task/Higher-order-functions/VBA/higher-order-functions.vba

12 lines
258 B
Text
Raw Permalink Normal View History

2017-09-23 10:01:46 +02:00
Sub HigherOrder()
Dim result As Single
result = first("second")
MsgBox result
End Sub
Function first(f As String) As Single
first = Application.Run(f, 1) + 2
End Function
Function second(x As Single) As Single
second = x / 2
End Function