FORTRAN - SUBST help and error

In summary, the conversation discusses a new FORTRAN user trying to debug and compile code. They have questions about the purpose of SUBST and DSUBST and an error they are receiving when running their Makefile. It is determined that the error is due to a capitalization inconsistency in the make files.
  • #1
ns2455
2
0
Hi,

I am new to FORTRAN and trying to debug/compile some code passed on to me.
2 questions:

- What purpose does SUBST or DSUBST serve?
- When I run my Makefile I keep getting the following error:
'PGF90-S-0026-Unmatched quote'
According to the PG manual this translates to 'Integer constant is too large for 32 bit word'
I have tried a bunch of different things but the issue is still unresolved. Any insight on this?

Thanks!
 
Technology news on Phys.org
  • #2
Since no one has replied, I'll take a shot. I don't believe that SUBST and DSUBST have anything to do with Fortran. Instead, it appears that they are preprocessor or makefile macros that are used when you build (i.e., compile and link) your application.

For the error message you show, I would look at the make files to see if there is a missing quote somewhere.

Hope this helps...
 
  • #3
Hey,

Thanks for your help. We were able to fix the problem. It was a capitalization inconsistency that was leading to all these different errors.
 

Related to FORTRAN - SUBST help and error

1. What is the purpose of FORTRAN-SUBST?

FORTRAN-SUBST is a subroutine in the FORTRAN programming language that is used to substitute specified characters or strings within a given string. It is commonly used for data manipulation and formatting in scientific and engineering applications.

2. How do I use FORTRAN-SUBST in my code?

To use FORTRAN-SUBST, you must first declare the subroutine in your program by including the statement "EXTERNAL SUBST" in your code. Then, you can call the subroutine using the syntax "CALL SUBST(string, old, new)" where "string" is the original string, "old" is the character or string to be replaced, and "new" is the character or string to be substituted.

3. What are some common errors that occur when using FORTRAN-SUBST?

Some common errors that can occur when using FORTRAN-SUBST include not properly declaring the subroutine in your code, using incorrect syntax when calling the subroutine, or attempting to substitute characters or strings that do not exist in the original string.

4. Can FORTRAN-SUBST be used for case-sensitive substitutions?

Yes, FORTRAN-SUBST is case-sensitive and will only replace characters or strings that match exactly. This means that if you want to substitute a lowercase character with an uppercase character, you must specify both versions in the "old" and "new" arguments.

5. Is FORTRAN-SUBST efficient for large datasets?

FORTRAN-SUBST is a fast and efficient subroutine that can handle large datasets. However, it is important to note that the larger the dataset, the longer the execution time may be. It is recommended to test the subroutine on a small sample of data before applying it to a larger dataset to ensure it is running correctly and efficiently.

Similar threads

  • Programming and Computer Science
Replies
4
Views
749
  • Programming and Computer Science
Replies
5
Views
4K
  • Computing and Technology
Replies
11
Views
248
  • Programming and Computer Science
Replies
12
Views
1K
  • Programming and Computer Science
Replies
2
Views
2K
  • Programming and Computer Science
Replies
16
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • Programming and Computer Science
Replies
7
Views
3K
  • Programming and Computer Science
Replies
17
Views
4K
  • Programming and Computer Science
Replies
3
Views
3K
Back
Top