Fortran Fortran 90 creating an array of unknown size

  • Thread starter Thread starter max2112
  • Start date Start date
  • Tags Tags
    Array Fortran
AI Thread Summary
The discussion revolves around creating a Fortran program to solve the Josephus Problem, focusing on a subroutine that initializes an array based on user input for the size. The user has implemented a subroutine to create an array of size n, but encounters issues with the program not functioning as expected. Key points include the need for dynamic array allocation in Fortran, as the current implementation uses fixed-size arrays which may lead to problems. Suggestions include using allocatable arrays to handle dynamic sizes and ensuring that the program outputs values after reading the size to verify functionality. The conversation emphasizes the importance of proper array management and output in Fortran programming.
Technology news on Phys.org
Summit like this:

Code:
subroutine(/arguments/)

real,allocatable :: array(:)

/code/

allocate ( array(x) )

/code/

deallocate ( array )

return
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...

Similar threads

Replies
5
Views
8K
Replies
4
Views
2K
Replies
5
Views
3K
Replies
4
Views
2K
Replies
2
Views
3K
Replies
25
Views
2K
Replies
3
Views
2K
Back
Top