forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error 24 - Array expressions

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
jose2kk



Joined: 21 Jul 2017
Posts: 1
Location: Venezuela

PostPosted: Thu Jul 27, 2017 8:35 pm    Post subject: Error 24 - Array expressions Reply with quote

Hello everybody,

I am a beginner in programming, this is my first post and I would like to be an active participant.

I am trying to make a code to solve 'bouyant force in a summerged object'.
Please find in the link below the code:
https://drive.google.com/open?id=0BxYwOb2RaOSfVFdwVXgzUm5hYnc

The problem is with the arrays in using to make the iterations, but I have tried many things and nothing have had effect. Compilation always failed.

Thanks in advance.

Cheers,
José Andrés.
_________________
Cheers,
José Andrés.
Back to top
View user's profile Send private message Send e-mail
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Fri Jul 28, 2017 1:20 am    Post subject: Reply with quote

Instead of just trying many things, you could develop the habit of reading the compiler's error messages and consulting the corresponding sections of the compiler documentation and/or a Fortran textbook to find out how to remove the errors.

Here are bugs that I noted:
    Tab characters in the source code.

    Use of an array instead of an array element in a scalar expression, Z+TS*WN.

    Use of an F format to print an integer variable.


Last edited by mecej4 on Fri Jul 28, 2017 12:59 pm; edited 2 times in total
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Fri Jul 28, 2017 7:14 am    Post subject: Reply with quote

Jose,
Not bad for the first code. No one in our class ended with their first code without errors besides me. Since then I program probably more then all of them together. But here was a trick.

My first code was to calculate day of the week for the arbitrary date.
That was punchcard era. Funny, but that at that time we thought that programming is so old-fashioned,dumb and boring for us top physics school students that I asked some older years guy to write it. Smile

Now I help many novices myself to avoid their cognitive dissonance trauma. It also looks like with time the programming (like cities) become less and less old-fashioned.

Do you mean Z+TS*WN(I) ?
And Format 2 for integers is I not F
GL
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group