Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

Dimension statement

Dimension statement—Specifies number and size of dimensions for each array (may be included in Type statement) lower bound default is 1... [Pg.116]

All the dimension statements are collected here DIM sleq(nrow, ncol), unk(nrow)... [Pg.101]

The cause of the problem lies in the numbers 3 and 113 used to raise the individual terms of the array to their cube power, and to take their cube root. When we raised the individual cells in the block (or the individual elements in Array) to their cube power, we reduced the results to single precision. To demonstrate this and, at the same time, fix the problem, add a dimension statement to both macros, reading Dim p As Double , and add a line specifying the value of p (e.g., either p = 3 or p =1/3 ). Finally, in the For Each... Next (or in the nested For... Next loop) refer to p rather than to 3 (or 1/3). The macros now should read like the example shown below, where we have also added a title and some comment lines and, as before, boldfaced the most recent changes. [Pg.388]

Such problems with data transfer can be avoided by declaring the parameters involved as Public, in which case they are accessible throughout the entire VBA module. Public parameters must be declared at the very beginning of the module, in the format of a dimension statement, but with Public instead of Dim, as illustrated below. Note that, in this case, we can merely invoke the subroutine by stating its name, leaving out its brackets and, even, the instruction Call. [Pg.395]

You may wonder why arrays such as newXiValue and SFiValue are assigned in the first block of instructions. The answer is that it serves to specify the actual sizes of these Variant arrays. A dimension statement such Dim newXiValue As Variant does not do this, because it leaves the actual array size unspecified. (Alternatively, after the macro has determined the value of N, we could have dimensioned newXiValue with ReDim newXiValue (1 To N) As Double, in which case it should subsequently... [Pg.405]

The last example, Dim, is a particular type of statement that requires some comment. Dimensioning is not required in VBA in order to keep matters as simple as possible, we have therefore not used dimensioning in the simple examples of section 10.1. Moreover, if one elects to use dimension statements, these can be placed just before the dimensioned parameter is used this tends to improve program readability. With all this freedom, why use dimension statements at all Apart from the usual reasons of efficient memory use, and the occasional need to specify double precision (see section 10.Id), itis a good guard against typos, as mentioned in section 10.12c. [Pg.471]

When a new formation is penetrated, the initial pressure will always be equal to the reservoir pore pressure. However, in this book and in the code, we will leave this input completely general, if only for code flexibility and the possibility that the program will be used in special experimental situations. Once the pressure field in space is obtained for a particular time step, it must be copied into the pressure array for the earlier pressure before pressures can be recursively advanced and integrated in time. The bookkeeping of an earlier time pressure array means that an additional Fortran dimension statement, plus more allocated memory, will be required. Aside from new input statements required for fluid compressibilities, we will need to modify the matrix coefficients B and W as required by Equations 20-23 and 20-37. That is, the -2 of Equation 20-37 is to be replaced by the term - 2 - c )pc(Ax)2/(kAt) of Equation 20-23, while the... [Pg.391]

SUBROUTINE or FUNCTION statement PARAMETER statement DIMENSION statement DATA statement... [Pg.188]


See other pages where Dimension statement is mentioned: [Pg.121]    [Pg.129]    [Pg.135]    [Pg.139]    [Pg.142]    [Pg.145]    [Pg.291]    [Pg.12]    [Pg.376]    [Pg.218]    [Pg.77]    [Pg.385]    [Pg.389]    [Pg.467]    [Pg.470]    [Pg.78]    [Pg.214]    [Pg.383]   
See also in sourсe #XX -- [ Pg.116 ]




SEARCH



© 2024 chempedia.info