Jump to content

Jensen's Device: Difference between revisions

Jensen's Device en FreeBASIC
(Realize in F#)
(Jensen's Device en FreeBASIC)
Line 573:
 
Incidentally, a subroutine such as TEST(A,B) invoked as TEST(X,X) enables the discovery of copy-in, copy-out parameter passing. Within the routine, modify the value of A and look to see if B suddenly has a new value also.
 
 
=={{header|FreeBASIC}}==
<lang freebasic>Sub Evaluation
Dim As Integer i, lo = 1, hi = 100
Dim As Double temp = 0
For i = lo To hi
temp += (1/i) ''r(i)
Next i
Print temp
End Sub
 
Evaluation
Sleep</lang>
{{out}}
<pre>
5.187377517639621
</pre>
 
 
=={{header|Go}}==
2,130

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.