![]() ![]() (in the old FORTRAN 77 world this was done with common blocks or pointers to the array, not sure how you do it in later versions of Fortran). In that case you'll need to modify the type of the function (and assign X to myfile) or pass the array in as a parameter and allow it to be modified in the function. I think what you want here is to pass the array you read in from the file back out of the routine. I just assigned it a value of 0 to allow it to compile. line 10 - since you declared this as a function you need to assign a return value to the function name before you leave the function.As written you were using a file named file instead of the name passed in as the file parameter. line 6 - You needed to remove the quotes around 'file' in the FILE='file' assignment.If all else fails, I guess I could read it as a single STRING and check that character by character for the appropriate number of commas for the column desired then assign them to a variable to store. I basically know the commands and only the most common of their options/formatting. ![]() Or ANY other ideas? I know my knowledge of FORTRAN command options/formatting isn't the best. Is there any suggestions on how I could either tell the formatted READ command to separate by commas or tell the unformatted command to ignore spaces? It seems as though no matter if I use the formatted or unformatted READ command, some of the data ends up getting split into two columns. This makes it so I can't set column widths to separate the data. To further complicate things, I cant use (to my knowledge) a formatted READ command because some fields (such as the item number) are not of uniform length. If I try to use the unformatted READ command, ever line is broken down differently after getting to the item description because it uses the spaces as breaks just like the commas. However, I run into the following problem:Įven though the file is Comma Separated, I can't use the unformatted READ command because the file also contains the item descriptions which contain spaces. I'm trying to read the file into FORTRAN to manipulate. His current computer program exports its item data in the form of. I'm in the process of writing a Suggested Reorder Program for my father's small business. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |