I thought calling a function seemed easy enough until i tried to write one.
I though it was as easy as:
program test
testFunction()
end program test
FUNCTION testFunction()
print *, "Hello World"
END
EDIT:
ok so why does below work. I just want a function that makes my code cleaning. No passing variables, no return type or anything
program test
REAL s
s = testFunction()
end program test
FUNCTION testFunction()
print *, "Hello World"
END
THanks
I though it was as easy as:
program test
testFunction()
end program test
FUNCTION testFunction()
print *, "Hello World"
END
EDIT:
ok so why does below work. I just want a function that makes my code cleaning. No passing variables, no return type or anything
program test
REAL s
s = testFunction()
end program test
FUNCTION testFunction()
print *, "Hello World"
END
THanks