Outputting Bitmap Images in Fortran without Record Delimiters

  • Context: Fortran 
  • Thread starter Thread starter drp85
  • Start date Start date
  • Tags Tags
    Fortran Images
Click For Summary

Discussion Overview

The discussion revolves around outputting bitmap images in Fortran, specifically addressing issues related to unwanted record delimiters in WRITE statements. Additionally, participants share experiences with compilation errors and warnings encountered in Fortran code, seeking clarification and assistance.

Discussion Character

  • Technical explanation
  • Homework-related
  • Debate/contested

Main Points Raised

  • One participant seeks to disable record delimiters when outputting bitmap images in Fortran.
  • Another participant suggests checking an external site for potential solutions to the bitmap issue.
  • A participant describes encountering compilation errors related to variable declarations and types in their Fortran code.
  • Warnings regarding precision mismatches in function arguments are noted, with one participant explaining that these arise from differing variable types between the calling and called subroutines.
  • Another participant expresses confusion about the meaning of the warnings and suggests that implicit typing might be causing issues.
  • Recommendations are made to include "implicit none" in programs to avoid type-related problems and to catch potential errors from misspelled variable names.

Areas of Agreement / Disagreement

There is no consensus on how to resolve the issue of record delimiters in bitmap output. Participants agree on the importance of using "implicit none" to prevent certain types of errors, but the discussion on bitmap output remains unresolved.

Contextual Notes

Participants mention specific compilation errors and warnings, indicating potential issues with variable types and declarations, but do not resolve these issues within the discussion.

drp85
Messages
1
Reaction score
0
In Fortran I need to output some data as a bitmap image, to visualise results. Problem is, with every WRITE statement it seems to append some unwanted bytes before and after the data itself. I have found out that these are called record delimiters, but I want to turn these off. How?
 
Technology news on Phys.org
I have played with f95, and when I ran into trouble I used to post on a site http://www.tek-tips.com
Try there to see if you get any answers.
 
Hi Friends,
Im trying to compile a small fortran code, but it gives me the following error.
g77 -o rayinv_vel_modl rayinv_vel_modl.f
dimension.inc: In subroutine `outputv':
dimension.inc:5:
integer mnsg, mnsg1, mnsgf
1
dimension.inc:17: (continued):
& mnsgf=nomi*mnsg, mnsd1=mnsd+mnsgf)
2
Invalid declaration of or reference to symbol `mnsgf' at (2) [initially seen at (1)]
dimension.inc:17:
& mnsgf=nomi*mnsg, mnsd1=mnsd+mnsgf)
^
Invalid form for PARAMETER statement at (^)Can someone help me, what's wrong with the code?

Thanking you in anticipation

cheers
 
Hi friends;
I have some problems with my fortran programma.When I compile it, the above errors occur;
dms0.f: In subroutine `ftltow':
dms0.f:123: warning:
call ftltow(gl,gw,S,dtau,0,nmax)
1
dms0.f:828: (continued):
subroutine ftltow(gl,gw,maxl,dtau,bose,nmax)
2
Argument #2 (named `gw') of `ftltow' is one precision at (2) but is some other precision at (1) [info -f g77 M GLOBALS]
dms0.f:123: warning:
call ftltow(gl,gw,S,dtau,0,nmax)
1
dms0.f:828: (continued):
subroutine ftltow(gl,gw,maxl,dtau,bose,nmax)
2
Argument #3 (named `maxl') of `ftltow' is one type at (2) but is some other type at (1) [info -f g77 M GLOBALS]

What is reason of these errors?

Thanks
 
They are not errors, they are warnings...it says it right there.

Also it say they are in regards to precision. That means that you have one variables declared with, say, REAL*4 but then you pass it to a function or subroutine and the variable catching this quantity is declared inside the subroutine with, say, REAL*8

...something along those line

Hope it helps.
 
selmayda said:
Hi;

Again I have a problem.what is the meaning of above warning?
thanks for helps

dms0.f: In subroutine `ftltow':
dms0.f:123: warning:
call ftltow(gl,gw,S,dtau,0,nmax)
1
dms0.f:828: (continued):
subroutine ftltow(gl,gw,maxl,dtau,bose,nmax)
2
Argument #3 (named `maxl') of `ftltow' is one type at (2) but is some other type at (1) [info -f g77 M GLOBALS]

Your variable "S" is defined as a different type (or kind) than that of your variable "maxl". It may be that one or other of these has been left undefined and is using an implicit type.

BTW. If you're not already doing so, I strongly recommend that you add the line "implicit none" to all of your programs and subroutines.
 
Thanks for your help
 
uart said:
I strongly recommend that you add the line "implicit none" to all of your programs and subroutines.

I second that recommendation. Besides situations like this one, it will prevent problems caused by simply misspelling a variable name. Without "implicit none", this creates a new variable of some default type, without your knowing it.
 

Similar threads

  • · Replies 29 ·
Replies
29
Views
6K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
19
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K