June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -0,0 +1,3 @@
|
|||
10 DEF FN MULT(X) = X*Y
|
||||
20 Y = 4 : REM VALUE OF SECOND ARGUMENT MUST BE ASSIGNED SEPARATELY
|
||||
30 PRINT FN MULT(3)
|
||||
7
Task/Function-definition/HolyC/function-definition.holyc
Normal file
7
Task/Function-definition/HolyC/function-definition.holyc
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
F64 Multiply(F64 a, F64 b) {
|
||||
return a * b;
|
||||
}
|
||||
|
||||
F64 x;
|
||||
x = Multiply(42, 13.37);
|
||||
Print("%5.2f\n", x);
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
function multiply(a::Number,b::Number)
|
||||
return a*b
|
||||
function multiply(a::Number, b::Number)
|
||||
return a * b
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
multiply(a,b) = a*b
|
||||
multiply(a, b) = a * b
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
(a,b) -> a*b
|
||||
multiply = (a, b) -> a * b
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
sub multiply (Rat $a, Rat $b) returns Rat { $a * $b }
|
||||
my Rat sub multiply (Rat $a, Rat $b) { $a * $b }
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
prog def multiply, return
|
||||
args a b
|
||||
return sca product=`a'*`b'
|
||||
end
|
||||
|
||||
multiply 77 13
|
||||
di r(product)
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
mata
|
||||
scalar multiply(scalar x, scalar y) {
|
||||
return(x*y)
|
||||
}
|
||||
|
||||
multiply(77,13)
|
||||
end
|
||||
3
Task/Function-definition/VBA/function-definition-1.vba
Normal file
3
Task/Function-definition/VBA/function-definition-1.vba
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Function Multiply(lngMcand As Long, lngMplier As Long) As Long
|
||||
Multiply = lngMcand * lngMplier
|
||||
End Function
|
||||
4
Task/Function-definition/VBA/function-definition-2.vba
Normal file
4
Task/Function-definition/VBA/function-definition-2.vba
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Sub Main()
|
||||
Dim Result As Long
|
||||
Result = Multiply(564231, 897)
|
||||
End Sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue