Hello,
I am using a Plato SilverFrost Personal version(.f95). I am trying to develop a function for the cross product of two vectors, a very simple function as follows. This program is not running. Can anybody help me, either this is program's issue or the version i am using ???
real :: x(3), y(3), cross_product(3)
do i=1,3
x(i) = i
y(i) = i*2
enddo
print *, x
print *, y
print *, cross_product(x,y)
end
!*********************************************** real function cross_product(a,b) real :: a(3), b(3), cross_product(3) cross_product(1) = a(2)b(3) - a(3)b(2) cross_product(2) = a(3)b(1) - a(1)b(3) cross_product(3) = a(1)b(2) - a(2)b(1) end function !*****************************************