Hi, sorry, I had just copied the extracted bit, whole pgm is below. Also I am learning Fortan - so in addition to this slightly trivial point, I would appreciate any improvements you can advise me on
--------------------
program sinPluscos1
!Summary...
Hi - sorry, newbie stuff, I fixed it with 'stars(cntr:1) = '*'
But when I try to print it as print *, stars I get a run-time error.
So the questions becomes how to initialise a string as n of a char, and then print it - keeping init and print simple 1-liners if possible?
Thanks
Hi - just learning FORTRAN, I want to print a line of '*', thought Id set up the line programmatically as follows:
character(len=n) :: stars
do cntr = 1, n
stars(cntr) = '*'
end do
However (I'm using silverleaf/plato) I get the following compile error "error 215 - Invalid...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.