The two Dim array should give 29x5, it gives 5x5.
Notice that SIZE does give the correct count = 29*5 =145
链接已复制
Ok, are we allowed only one file upload per visit?
I will upload the 2nd one later.
But if it displays 2 files when I upload it,
why doesn't it show both to you?
actually, it tried to upload the main routine 3 times, and gave a different name to the same file, rather than replacing it.
Thats why we see Main, main-1 ,and main-2.
One can upload multiple files and it is done often. I don't know how you tried to do the upload. There are two steps - first you have to select the files and then click "Upload". Yes, it will rename files if there are duplicates (or sometimes even if there aren't.)
WELL, THAT IS EXACTLY WHAT I DID -
I SELECTED TWO FILES TWO BE UPLOADED,
and then said "begin upload." It said two files uploaded.
But then when I displayed it, it only showed one file.
So what happened to the other file?
I am going to do it again, but this time will put the other
file FIRST in the list.
Now this should have two files attached, according to what I see on the screen for "preview."
Uploading and attaching are separate, if related, activities. To attach a file, it is required that the file be present in your file storage area.
If you have files already present in your storage area, you can select and attach them without any uploading; conversely you may upload files without posting a message, or you may post a message without attaching a file.
Files that have been uploaded remain in your file storage area forever, pending Intel's granting users the ability and means to delete uploaded files that are no longer needed.
It uploaded two this time - thanks.
In aver2d, you used UBOUND(a,2). This returns a scalar that is the upper bound of dimension 2. You then assigned this to a two-element array so you got 5 in both elements. What you wanted instead was UBOUND(a).
Next brings you back to the post so you can continue editing.
The problem was originally caused by a compiler error when I leave off the 2nd argument (#6366.)
But it does NOT occur for 2d and3d arrays, only 1d arrays.
So I assumed that has to be supplied for a 2d or 3d array. apparently the usage is not consistent.
I am uploading another main program main_48.f90 that includes a 3d array.
and an enhanced version of myfuncts.f90
did you get two files this time? It said two files - -
BTW it says "file attachments may not load with IE 8."
But I am using CHROME for my browser.
How do I send a screen shot? I would like you to see what it does.
One thing that looks suspicious: The order for one of them says "0"
Is that acceptable?
Ok. In the case of aver1d, you have declared lba and uba to be scalars. LBOUND and UBOUND, when DIM is not supplied, return arrays. You're not allowed to assign an array to a scalar.
One fix is to make lba and uba arrays with one element and call LBOUND and UBOUND without the DIM argument. This is probably the best choice as it means the code is pretty much the same other than the rank of the arguments and dimensions of the lba/uba variables.
This is a fundamental aspect of the Fortran language. We provide reference documentation, but aren't trying to teach you Fortran. There are some excellent books out there that do that, the most popular of which is Modern Fortran Explained.
