[D] Uma “expressão” Fortran é definida como uma combinação de itens sintáticos, isto é: uma expressão pode consistir de uma única constante, de uma única. Baixe grátis o arquivo Fortran 90 enviado por Wanessa no curso de Engenharia de Produção na UFF. Sobre: Programação de Computadores. Português e em Inglês, para programação em Visual Fortran. Fortran, com o uso do tutorial, são indicadores da relevância do material desenvolvido e.

Author: | Mazukinos Vigore |

Country: | Montenegro |

Language: | English (Spanish) |

Genre: | Health and Food |

Published (Last): | 22 May 2011 |

Pages: | 467 |

PDF File Size: | 6.34 Mb |

ePub File Size: | 7.70 Mb |

ISBN: | 542-6-40910-573-7 |

Downloads: | 53644 |

Price: | Free* [*Free Regsitration Required] |

Uploader: | Goramar |

Reid, Oxford,the book upon which it has been based. The basic components of the Fortran language are its character set. From these apostika, we build the tokens that have a syntactic meaning to the compiler. There are six classes of token:. Fromthetokens, we can buildstatements. These can be codedusingthenewfree source formwhichdoesnotrequirepositioning in a rigid column structure, as follows:.

Note the trailingcomments and the trailingcontinuationmark. There may be 39 continuationlines, and characters per line. Where a token or character constant is forttran across two lines:.

The source code of the program can be obtained by anonymous ftp to The directory is and the file name is. Fortran has five intrinsic data types.

For each there is a corresponding form of literal constant. For the three numeric intrinsic types they are:.

Here, is the kind type parameter; it can also be a default integer literal constant, like but use of an explicit literal constant would be non-portable. The function supplies the value of a kind type parameter:. Also, in statements, binary, octal and hexadecimal constants may be used:. There are at least two real kinds — the default, and one with greater precision this replaces. We might specify vortran at least 9 decimal digits of precision and a range of toallowing Also, we have the intrinsic apostilz that give in turn the kind type value, the actual precision here at least 9and the actual range here at least 9.

## Fortran 90 – Tutorial

This data type is built of two integer or real components: The numeric types are based on model numbers with associated inquiry functions whose values are independent of the values of their arguments. These functions are important for writing portable numerical software. Number of significant digitsAlmost negligible compared to one real Largest numberMaximum model exponent real Minimum model exponent real Decimal precision real, complex Base of the modelDecimal exponent rangeSmallest postive number real.

Other kinds are allowed, especially for support of non-European languages: We can specify scalar variables corresponding to the five intrinsic types:. The explicitand specifiers are optional and the following works just as well: For derived-data types we must first define the form of the type:.

We note that the qualifier was chosen rather than because of ambiguity difficulties. Arrays are considered to be variables in their apostla right. Elements are, for example, and are apostial.

The subscripts aposhila be any scalar integer expression. Whole arrays and array sections are array-valued objects. Array-valued constants constructors are available:.

A derived data type may, of course, contain array components:. Fortran 90 Tutorial 5 There are some other interesting character extensions.

### APOSTILA DE FORTRAN – FÍSICA COMPUTACIONAL – UNESP/BAURU – Capítulo 4

Just as a substring as in was already possible, so now are the substrings. Also, zero-length strings are allowed: Finally, there are some new intrinsic character functions:. The rules for scalar numeric expresions and assignments, as fortram from FORTRAN 7, are extended to accommodate the non-default kinds we encountered in chapter 1.

Thus, the mixed-mode numeric expression and assignment rules incorporate different kind type parameters in an expected way:.

In the case of scalar characters, two old restrictions are lifted. Given it is now legal to write. For an operation between derived-data types, or between a derived type and an intrinsic type, we must define the meaning of the operator. Between intrinsic types, there are intrinsic fortram only.

Given we can write. We see here the use bothof an intrinsicsymbol and of a named operator. A difference is that, for an intrinsicoperator token, the usual precedence rules apply, whereas for named operators their precedence is the highest as a unary operator or the lowest as a binary one.

In the two expresions are equivalent only if appropriate parentheses are added as shown. In each case, we have to provide, in a module, procedures defining the operator and assignment, and make the association by an interface block, also in the module we shall return to this later. Fortran 90 Tutorial 7 For the moment, here is an example of an interface for string concatenation and an example of part of a module containing the definitions of character-to-string and string to character assignment.

The string concatenation function was shown already in part 1. Defined operators such as these are required for the expressions that are allowed too in structure constructors see chapter Fortran 90 – Tutorial Wanessa row Enviado por: The tutorial is also available on W using the URL.

Version of October Fortran 90 Tutorial 1 1. Language Elements The basic components of the Fortran language are its character set. There are six classes of token: These can be codedusingthenewfree source formwhichdoesnotrequirepositioning in a rigid column structure, as follows: Where a token or character constant is split across two lines: For the three numeric intrinsic types they are: The function supplies the value of a kind type parameter: Also, in statements, binary, octal and hexadecimal constants may be used: Number of significant digitsAlmost negligible compared to one real Largest numberMaximum model exponent real Minimum model exponent real Decimal precision real, complex Base of the modelDecimal exponent rangeSmallest postive number real Fortran 90 Tutorial 3 The forms of literal constants for the two non-numeric data types are: Here, there may also be different kinds to allow for packing into bits: We can specify scalar variables corresponding to the five intrinsic types: For derived-data types we must first define the form of the type: To select components of a derived type, we use the qualifier: Fortran 90 Tutorial 4 Definitions may refer to a previously defined type: Given the latter an example of the syntax that allows grouping of attributes to the left of and of variables sharing those attributes to the rightwe have two arrays whose elements are in array element order column majorbut not necessarily in contiguous storage.

Sections are Whole arrays and array sections are array-valued objects.

### Apostila de FORTRAN | Antonio Tavares Bittencourt –

Array-valued constants constructors are available: A derived data type may, of course, contain array components: Just as a substring as in was already possible, so now are the substrings Also, xpostila strings are allowed: Finally, there are some new intrinsic character functions: Expressions and Assignments The rules for scalar numeric expresions and assignments, as known from FORTRAN 7, are extended to accommodate the non-default kinds we encountered in chapter 1.

Thus, the mixed-mode numeric expression and assignment rules incorporate different kind type parameters in an expected way: For scalar relational operations, there is a set of new, alternative operators: Given it is now legal to write For an operation between derived-data types, or between a derived type and an intrinsic type, we must define the meaning of the fortrzn. Defined operators such as these are required for the expressions that are allowed too in structure constructors see chapter 1: Arquivos Semelhantes Fortran 90 Tutorial Tutorial simples em fortran.