| How to convert characters to number |
|
 |
Index ‹ fortran
|
- Previous
- 2
- Divide by infinity in F90/95Could someone tell me if dividing by infinity is allowed in the F90/95
standard. The code scrap below works fine in my compiler (DVF 6.0), but I
suspect it is not standards compliant.
a = 1.0; b = 2.0; c = 0.0; d = 1.0; e = 1.0
d = a/(b/c) ! here d = 0.0
d = b/c ! here d = infinity
e = a/d ! here d = 0.0
Paul Holden
- 4
- PathScale Compiler Team Joins SiCortexfrom a Business Wire news release:
PathScale Compiler Team Joins SiCortex
Industry-Leading Compiler Developers to Focus on High Processor Count
Applications
MAYNARD, Mass.--(BUSINESS WIRE)--SiCortex, the first company to
engineer a Linux?cluster from the silicon up, announced today that it
has acquired the PathScale compiler business from QLogic Corp.
(Nasdaq:QLGC). PathScale's compiler team, along with certain
intellectual property and business agreements, will join SiCortex.
Fred Chow, who heads up the PathScale team at QLogic, will join
SiCortex as director of compiler engineering.
"This will allow PathScale LLC to focus on delivering even greater
compiler performance and multicore processor scalability," said
Margaret Lewis, director, Commercial Solutions, AMD. "PathScale
remains an important member of the ecosystem of AMD partners who are
working with AMD to evolve multicore processing."
The award-winning PathScale Compiler Suite offers high-performance C, C
++, and Fortran 95 compilers for 64-bit Linux-based computer systems.
The compiler suite offers sophisticated optimization infrastructures
for X86-64 and MIPS64 architectures. Providing time-saving GNU
compatibility and utilizing advanced processor features, the Pathscale
Compiler Suite is an essential development tool for performance-
sensitive software engineers.
- 4
- Two questions about character strings ...Hello,
I have begun writing a small set of programs to highlight certain
aspects of Fortran 90/95 (it should provide me and others with
more insight in the various capabilities of Fortran compilers)
One of them has to do with the features that list-directed input offers.
My questions are related to that:
1. How should tabs in input files (external or internal files) be treated?
I get the impression from experiments with two unrelated compilers
that a tab is treated like a space. Is that in accordance with the
standard?
2. One (old) Fortran 90 compiler complained about the following:
character(len=10), dimension(1:4) :: array
array = (/ 'A', 'B C', 'D', 'E F' /)
It complained that all strings in such an array constructor
should have the same length.
Is that prescribed by the standard? Or is this a whim from
this particular compiler?
Regards,
Arjen
- 5
- missing include by compilerFrom: "Dr Ivan D. Reid"
>Never used Pascal
> meself, tho' I've occasionally debugged it.
I used Turbo Pascal for a couple of years when it was too clumsy to use
fortran on a dual-floppy PC. Neat language, in some respects. I think
everything I do in fortran could be done in pascal if it had 1) separate
compilation , 2) variable-dimension arrays, and 3) the equivalent of netlib.
Sure hated declaring variables, though.
- 10
- hdf5 example for unstructured gridHi all,
I want to write out my data in hdf5 format. I already found
some small example in the net, but none are for unstructured
mesh; at least I couldn't find any.
Maybe, anybody of you have a small example for unstructured
3D data? It would be a great help.
Greetings, Fabian
- 11
- Lahey LF Fortran95 / VS2005 betaLahey Computer Systems, Inc. is pleased to announce the LF Fortran95 /
VS2005 beta.
Features include:
Win32 project and project item templates.
Project system.
On-line integrated help.
Syntax coloring.
Expandable code.
Method tips for intrinsic functions.
Quick info for local and global variables.
Block commenting and indenting.
Brace matching.
Automation support.
MSBuild support.
Go to http://www.lahey.com/VSbeta.htm to download your copy now!
John Swenson
Tallac Technology, LLC
www.tallactech.com
800.548.4778
530.587.2912
530.587.5635 Fax
- 11
- Commas in FORMATsHi experts,
maybe I am blind, but skimming through section 10 of the F2003 standard
I did not find any rule that prohibits double commas in a FORMAT
specification as in
print '(i5,,i5)', 1,2
end
Some compilers just accept this code fragment happily, some swallow it
at compile time but bail out at runtime, and some even produce a nice
core dump during program execution. =:-|
Section 10.1.1 explains where the comma used to separate format-items in
a format-item-list may be omitted, but it does not appear to answer the
above question...
--
Cheers,
-ha
- 11
- Possible glibc issue in using Intel's IFCHi
I use the Intel Fortran compiler 7.0.14 on my Linux desktop - RH 9.0
(custom compiled kernel 2.4.20, glibc : 2.3.2-11.9).
When I compile *some* of my programs (which worked perfectly for RH 7.3), I
get the following error :
external subroutine FINDINARRAY
155 Lines Compiled
program VELCPROFILE
Comment 2 : In program unit VELCPROFILE format 22 is not used
82 Lines Compiled
/usr/local/intel/compiler70/ia32/lib/libIEPCF90.a(f90fioerr.o)(.text+0x4d3):
In
function `f_f77ioerr':
: undefined reference to `__ctype_b'
A reference to premier.intel.com reveals a cryptic statement that RH 9.0 is
not supported for IFC as ctype definitions are absent in the glibc that
comes with it (or words to that effect).
My question is :
How do I fix it (either glibc or possibly a newer version of ifc) so that I
can compile these few programs ?
Thanks,
MS
- 11
- Fortran 2003/2008 features and compiler pollHi,
mainly for curiosity, I set up the following webpage to see which
Fortran 2003 and Fortran 2008 are most requested and which are already
in use. Additionally, I ask some questions about used parallelization
techniques and compilers. (Sorry, the number of questions is quite
long.)
http://physik.fu-berlin.de/~tburnus/F2003-polling/index.php
The input might also be used by compiler writers (esp. gfortran) to
help deciding which feature should be implemented first.
Tobias
- 14
- questions on binary vs text filesHi, I hope someone can help. I need to do a lot of input/output
between a C code and a Fortran code. I don't want at this stage to merge
the codes to have a single executable, so I need to read/write to
a disk. The C code accepts both text format and "binary integer format".
Questions:
1. what is the fastest way to read/write files?
2. what is "binary integer format"?
3. how do I create a binaty integer file in Fortran? I've tried
FORM='UNFORMATTED' but it doesn't seem to produce the right
format that the C code wants.
4. i've read often that the "unformatted" files are smaller and
faster to read/write. However my experience with Fortran indicates
the contrary (for integer numbers). Which is true?
thanks in advance.
Eric
- 14
- Fortran 2003 question regarding public entries of private typesHello,
I have some interpretation problems with the Fortran 2003 standard:
MODULE mod
IMPLICIT NONE
TYPE, PRIVATE :: hidden
integer :: x
END TYPE hidden
TYPE(hidden), PUBLIC :: one = hidden(5)
END MODULE mod
PROGRAM prog
USE mod, only: one
IMPLICIT NONE
PRINT *, one
PRINT *, one%x
END PROGRAM prog
My question is whether "PRINT *, one" and "PRINT *, one%x" are valid.
(I think the first is not while the second is.)
That "one" can be public although "hidden" is PRIVATE is a change
between Fortran 95 and 2003:
Fortran 95: "If a type definition is private, then the type name, the
structure constructor (4.4.4) for the type, any entity that is of the
type, and any procedure that has a dummy argument or function result
that is of the type are accessible only within the module containing
the definition.
Fortran 2003: "If a type definition is private, then the type name,
and thus the structure constructor (4.5.9) for the type, are
accessible only within the module containing the definition."
I would argue that "PRINT *, one%x" is valid as (Fortran 2003):
"The accessibility of a type does not affect, and is not affected by,
the accessibility of its components".
For "PRINT *, one" I'm believe that it is invalid as type definition
of "hidden" is PRIVATE, but I'm not sure that I have not overlooked
something.
Tobias
Fortran 2003:
---------------
4.5.1.1 Accessibility
Types that are defined in a module or accessible in that module by use
association have either the PUBLIC or PRIVATE attribute. Types for
which an
access-spec is not explicitly specified in that module have the
default
accessibility attribute for that module. The default accessibility
attribute
for a module is PUBLIC unless it has been changed by a PRIVATE
statement
(5.2.1). Only types that have the PUBLIC attribute in that module are
available
to be accessed from that module by use association.
The accessibility of a type does not affect, and is not affected by,
the
accessibility of its components and bindings.
If a type definition is private, then the type name, and thus the
structure
constructor (4.5.9) for the type, are accessible only within the
module
containing the definition.
---------------
Fortran 95:
---------------
4.4.1 Derived-type definition
[...]
The accessibility of a derived type may be declared explicitly by an
access-spec in its derived-type-stmt or in an access-stmt (5.2.3). The
accessibility is the default if it is not declared explicitly. If a
type
definition is private, then the type name, the structure constructor
(4.4.4)
for the type, any entity that is of the type, and any procedure that
has a
dummy argument or function result that is of the type are accessible
only
within the module containing the definition.
If a type definition contains a PRIVATE statement, the component names
for the
type are accessible only within the module containing the definition,
even if
the type itself is public (5.1.2.2). The component names and hence the
internal
structure of the type are inaccessible in any scoping unit accessing
the module
via a USE statement. Similarly, the structure constructor for such a
type shall
be employed only within the defining module.
---------------
- 14
- free IMSL-like library?Hi all,
recently I got a program which uses 4 functions of the IMSL-library. Since
I am not able to purchase the whole library I am wondering if there is a
similar free library available so I can use the program after a
little rewriting effort. The functions used are BSJNS, BSYS and CBJNS for
the calculation of Bessel functions and LSACG to solve a linear equation
system.
Greetings from Ulm,
Jan
- 14
- how to read a parameter from a normal text filehello, I have an output file which format is as below:
--------------------------------------------------------------------
this file was generated by a.exe
basic data is:
203 9.292 -11.2890
end
main data is:
115 3.23232 8.12323 -55.78988 0.23311 0.89780
116 -5.98786 3.23217 8.34908 22.27768 0.66782
117 63.89032 -1.32890 0.00892 7.11278 12.05623
118 0.00232 89.09032 -1.11223 0.78034 -36.98778
119 12.78676 -2.32434 78.35678 -0.30289 0.00170
120 33.23276 119.30933 0.90989 -2.22591 20.23237
end
note: the input seed is 890.231 (random)
total output time: 23 secs
--------------------------------------------------------------------
I want to get the 2nd number of the "basic data" line, i.e. "9.292 ";
the 5th number of the 5th "main data" line, i.e. "-0.30289"; and the
number in the "note" line, i.e. "890.231".
The file structure is fixed, but the total number of data lines could
be different in cases of different input conditions. Therefore, I could
read the numbers by their absolute positions.
Could you help me? Thank you very much!
- 14
- Avoiding LabelsCan this code be rewritten to avoid the label:
open(unit=3, file='myData.txt')
m=1
do while (.true.)
read(3,end=10,fmt=*)x(m),y1(m)
m=m+1
enddo
10 close(unit=3)
Thanks
Michael
- 16
- integer to char conversionanybody knows how to convert an integer to the char type?
I don't mean the command char(i) and ichar(a), which use ascii
I want to convert an integer like '445' into a chain of character "445" so
as to be able to concatenate a string with the the gotten result.(with //)
the goal is to generate filenames beginning with a common string and ending
by (for example) the size of the file calculated or whatever mathematical
result. so I will concatenate (for example) the string describing the file
with the mathematical result gotten.
--
heavytull
|
| Author |
Message |
Haifang Li

|
Posted: 2004-1-23 0:14:11 |
Top |
fortran, How to convert characters to number
Hi,
If I have a character variable A and real*4 variable B, how can I assign
the value in A to B?
I know this works: read(A,'(f15.6)') B when a='57.1234' or a='57.0' but not
when a='57'.
Is there a smarter way to convert? I am using visual fortran 6.6.
Thanks,
Haifang Li
|
| |
|
| |
 |
Richard Maine

|
Posted: 2004-1-23 4:44:00 |
Top |
fortran >> How to convert characters to number
"Haifang Li" <haifang.li@stonybrook.edu> writes:
> If I have a character variable A and real*4 variable B, how can I assign
> the value in A to B?
>
> I know this works: read(A,'(f15.6)') B when a='57.1234' or a='57.0' but not
> when a='57'.
>
> Is there a smarter way to convert? I am using visual fortran 6.6.
Your problem is just in understanding the F edit descriptor. Do you
know what the .6 part of f15.6 means on input? Why do you have a .6
there? It specifies where to put an implied decimal point if there
isn't an explicit one. Mostly, I consider the business about implied
decimal points to be archaic. One should generally make decimal
points explicit, except when you have whole numbers, that is the
implied decimal point is on the right.
With f15.6, you tell the compiler to interpret 57 with an implied
decimal point of 0.000057, which I assume is the result you get.
Just use f15.0 instead of f15.6. Then if you don't have a decimal
point, the implied one is at the right, just like humans would
normally assume. If you ever have a decimal point anywhere other
that the right, then make it explicit. Don't *EVER* write code
that anticipates users will enter 5.7 as 57 just to save typing
the decimal point.
An alternative is to just use
read(A,*) B
As of f90, list-directed internal I/O is standard (and CVF supports
f90).
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
|
| |
|
| |
 |
glen herrmannsfeldt

|
Posted: 2004-1-23 8:07:00 |
Top |
fortran >> How to convert characters to number
Richard Maine wrote:
(snip)
>>I know this works: read(A,'(f15.6)') B when a='57.1234' or a='57.0' but not
>>when a='57'.
(snip)
> Your problem is just in understanding the F edit descriptor. Do you
> know what the .6 part of f15.6 means on input? Why do you have a .6
> there? It specifies where to put an implied decimal point if there
> isn't an explicit one. Mostly, I consider the business about implied
> decimal points to be archaic. One should generally make decimal
> points explicit, except when you have whole numbers, that is the
> implied decimal point is on the right.
It made a lot of sense in the days of cards, though even then putting
in the decimal point was usually best.
> With f15.6, you tell the compiler to interpret 57 with an implied
> decimal point of 0.000057, which I assume is the result you get.
I would have guessed that the '57' would expand with blanks on the
right as '57 ' and the result would be 570000000.
If you put 57 in columns 1 and 2 of a card that is what it would do.
> Just use f15.0 instead of f15.6. Then if you don't have a decimal
> point, the implied one is at the right, just like humans would
> normally assume. If you ever have a decimal point anywhere other
> that the right, then make it explicit. Don't *EVER* write code
> that anticipates users will enter 5.7 as 57 just to save typing
> the decimal point.
If my guess above is right, then this won't work.
> An alternative is to just use
> read(A,*) B
> As of f90, list-directed internal I/O is standard
> (and CVF supports f90).
I thought it was in F77, but then again, I haven't checked lately.
-- glen
|
| |
|
| |
 |
Richard Maine

|
Posted: 2004-1-23 8:17:00 |
Top |
fortran >> How to convert characters to number
glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
> Richard Maine wrote:
>
>> With f15.6, you tell the compiler to interpret 57 with an implied
>> decimal point of 0.000057, which I assume is the result you get.
>
> I would have guessed that the '57' would expand with blanks on the
> right as '57 ' and the result would be 570000000.
...
>> Just use f15.0 instead of f15.6....
> If my guess above is right, then this won't work.
I'll admit to cheating. :-(
Since I don't really think this good practice, I didn't spend a lot
of time carefully analyzing it. But I did a quick check with
NAG f95 and that's what it did. I just assumed they have it right.
But I didn't check. Maybe I'm wrong.
>> An alternative is to just use
>
>> read(A,*) B
>
>> As of f90, list-directed internal I/O is standard
> > (and CVF supports f90).
>
> I thought it was in F77, but then again, I haven't checked lately.
No. Definitely not. List-directed I/O was in f77. Internal I/O
was also in f77, but list-directed internal I/O was not. Several
compilers didn't support it (and some had pretty obscure symptoms
if you tried it). I think that most of the later vintage f77
compilers supported it, but earlier ones did not and it was not
standard.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
|
| |
|
| |
 |
glen herrmannsfeldt

|
Posted: 2004-1-23 9:57:00 |
Top |
fortran >> How to convert characters to number
Richard Maine wrote:
> glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
>>Richard Maine wrote:
>>>With f15.6, you tell the compiler to interpret 57 with an implied
>>>decimal point of 0.000057, which I assume is the result you get.
>>I would have guessed that the '57' would expand with blanks on the
>>right as '57 ' and the result would be 570000000.
(snip)
> I'll admit to cheating. :-(
> Since I don't really think this good practice, I didn't spend a lot
> of time carefully analyzing it. But I did a quick check with
> NAG f95 and that's what it did. I just assumed they have it right.
> But I didn't check. Maybe I'm wrong.
I seem to remember DEC compilers doing non-standard things
with terminal I/O. Especially before list directed input.
It might be that they did what people expected, instead of what
the standard expected. Formatted input, especially with
implied decimal points, is not convenient from a terminal.
What does your compiler do with 2F15.6 format, two variables,
and '57 12' for the input string?
I would say that it should be 570120000, as blanks are zeros.
Since it isn't wide enough to reach the second is 0.0.
I believe, though, that some of the DEC compilers would assign
57 to the first, and 12 to the second.
(alt.sys.pdp10 added, in case anyone there knows about that.)
(snip regarding list directed internal I/O, especially I)
>>I thought it was in F77, but then again, I haven't checked lately.
> No. Definitely not. List-directed I/O was in f77. Internal I/O
> was also in f77, but list-directed internal I/O was not. Several
> compilers didn't support it (and some had pretty obscure symptoms
> if you tried it). I think that most of the later vintage f77
> compilers supported it, but earlier ones did not and it was not
> standard.
Yes, I had remembered the two separately and hadn't thought that
they would work differently when combined. Very strange.
I suppose no-one remembers FIO999.
http://www.soton.ac.uk/~fortran/libraries/cern/old/fio999
-- glen
|
| |
|
| |
 |
Mark Crispin

|
Posted: 2004-1-23 10:29:00 |
Top |
fortran >> How to convert characters to number
On Fri, 23 Jan 2004, glen herrmannsfeldt wrote:
> What does your compiler do with 2F15.6 format, two variables,
> and '57 12' for the input string?
> I would say that it should be 570120000, as blanks are zeros.
> Since it isn't wide enough to reach the second is 0.0.
My Fortran is very rusty, but the following Fortran program:
ACCEPT 10,A,B
TYPE 10,A,B
10 FORMAT (2F15.6)
STOP
END
ran as follows on a TOPS-20 system:
@execute foo
FORTRAN: FOO
MAIN.
LINK: Loading
[LNKXCT MAIN. execution]
57 12
0.005712 0.000000
CPU time 0.01 Elapsed time 5.54
@
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
|
| |
|
| |
 |
glen herrmannsfeldt

|
Posted: 2004-1-23 12:27:00 |
Top |
fortran >> How to convert characters to number
Mark Crispin wrote:
(snip)
> My Fortran is very rusty, but the following Fortran program:
> ACCEPT 10,A,B
> TYPE 10,A,B
> 10 FORMAT (2F15.6)
> STOP
> END
> ran as follows on a TOPS-20 system:
(snip)
> [LNKXCT MAIN. execution]
> 57 12
> 0.005712 0.000000
> CPU time 0.01 Elapsed time 5.54
I am 100% sure that blanks count as zero, so that can't
be right. Very strange.
F66, section 7.2.3.6 "With all numeric input conversions, leading
blanks are not significant, and other blanks are zero."
I had thought I remembered one from TOPS-10 days where it
would start the next field after such a blank, even though
it would have been too early in column count.
-- glen
|
| |
|
| |
 |
Mark Crispin

|
Posted: 2004-1-23 13:29:00 |
Top |
fortran >> How to convert characters to number
On Fri, 23 Jan 2004, glen herrmannsfeldt wrote:
> > My Fortran is very rusty, but the following Fortran program:
> > ACCEPT 10,A,B
> > TYPE 10,A,B
> > 10 FORMAT (2F15.6)
> > STOP
> > END
> > ran as follows on a TOPS-20 system:
> > 57 12
> > 0.005712 0.000000
> I am 100% sure that blanks count as zero, so that can't
> be right. Very strange.
You said that you were referring to the F66 specification. The TOPS-20
FORTRAN-20 compiler is F77.
The UNIX f77 compiler more or less agrees with TOPS-20 FORTRAN-20; or
rather, it reads them as the same numeric values but the output is
slightly different.
I had to change the ACCEPT 10 and TYPE 10 statements to READ (5,10) and
WRITE (6,10) before f77 would compile it, but the results are nearly
identical:
% a.out
57 12
.005712 .000000
%
I can understand why TOPS-20 FORTRAN-20 deleted a space in the output of
the first number; it's obviously carriage control. I don't understand why
UNIX f77 added two spaces.
I have long since forgotten enough of my Fortran to know whether F15.6
should output with a zero in front of the decimal point. After all, it
has been 30 years!!!!
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
|
| |
|
| |
 |
glen herrmannsfeldt

|
Posted: 2004-1-23 13:41:00 |
Top |
fortran >> How to convert characters to number
glen herrmannsfeldt wrote:
> Mark Crispin wrote:
> (snip)
>> My Fortran is very rusty, but the following Fortran program:
>> ACCEPT 10,A,B
>> TYPE 10,A,B
>> 10 FORMAT (2F15.6)
>> STOP
>> END
(snip)
>> [LNKXCT MAIN. execution]
>> 57 12
>> 0.005712 0.000000
> I am 100% sure that blanks count as zero, so that can't
> be right. Very strange.
> F66, section 7.2.3.6 "With all numeric input conversions, leading
> blanks are not significant, and other blanks are zero."
OK, I tried both WATFIV and Fortran G, and they do what I would
have expected. Reading in with 2F15.6 and out with 2G25.6,
reading from (simulated) card input.
0.570120E 09 0.0
The blank counts as zero, and the decimal point is 9 columns
from the left.
WATFIV will do internal I/O with CHARACTER variables but not
constants, so with a CHARACTER*5 variable containing '71 12' I get:
***ERROR*** FORMATTED LINE EXCEEDS BUFFER LENGTH (IBM CODE IHC212)
That is, reading more characters than the length of the input record.
This would be the error reading more than 80 columns off a card.
-- glen
|
| |
|
| |
 |
Paul Rubin

|
Posted: 2004-1-23 13:46:00 |
Top |
fortran >> How to convert characters to number
glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
> OK, I tried both WATFIV and Fortran G, and they do what I would
> have expected. Reading in with 2F15.6 and out with 2G25.6,
> reading from (simulated) card input.
OMG. How are you running THOSE?
|
| |
|
| |
 |
Mark Crispin

|
Posted: 2004-1-23 14:05:00 |
Top |
fortran >> How to convert characters to number
On Fri, 23 Jan 2004, glen herrmannsfeldt wrote:
> OK, I tried both WATFIV and Fortran G, and they do what I would
> have expected.
Could this be an F66/F77 difference?
We seem to have two compilers which do it one way, and two which do it the
other way.
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
|
| |
|
| |
 |
glen herrmannsfeldt

|
Posted: 2004-1-23 16:20:00 |
Top |
fortran >> How to convert characters to number
Mark Crispin wrote:
> On Fri, 23 Jan 2004, glen herrmannsfeldt wrote:
>>OK, I tried both WATFIV and Fortran G, and they do what I would
>>have expected.
> Could this be an F66/F77 difference?
> We seem to have two compilers which do it one way, and two which do it the
> other way.
It could be. Others have the F77 standard and may tell us.
-- glen
|
| |
|
| |
 |
glen herrmannsfeldt

|
Posted: 2004-1-24 4:02:00 |
Top |
fortran >> How to convert characters to number
Paul Rubin wrote:
> glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
>>OK, I tried both WATFIV and Fortran G, and they do what I would
>>have expected. Reading in with 2F15.6 and out with 2G25.6,
>>reading from (simulated) card input.
> OMG. How are you running THOSE?
I run them on a P/370, but others run them on Hercules.
I believe they will still run under z/OS on machines
currently in production.
You didn't ask where Mark Crispin was running TOPS-20, though.
-- glen
|
| |
|
| |
 |
glen herrmannsfeldt

|
Posted: 2004-1-24 5:52:00 |
Top |
fortran >> How to convert characters to number
Mark Crispin wrote:
(snip)
>>I am 100% sure that blanks count as zero, so that can't
>>be right. Very strange.
> You said that you were referring to the F66 specification. The TOPS-20
> FORTRAN-20 compiler is F77.
Well, that is mostly because I have a copy of the F66 standard
and not the F77 standard. It may be that it changed, though
I wouldn't expect the blanks are zeros part to change.
> The UNIX f77 compiler more or less agrees with TOPS-20 FORTRAN-20; or
> rather, it reads them as the same numeric values but the output is
> slightly different.
> I had to change the ACCEPT 10 and TYPE 10 statements to READ (5,10) and
> WRITE (6,10) before f77 would compile it, but the results are nearly
> identical:
>
> % a.out
> 57 12
> .005712 .000000
> %
> I can understand why TOPS-20 FORTRAN-20 deleted a space in the output of
> the first number; it's obviously carriage control. I don't understand why
> UNIX f77 added two spaces.
> I have long since forgotten enough of my Fortran to know whether F15.6
> should output with a zero in front of the decimal point. After all, it
> has been 30 years!!!!
The standard, at least F66, leaves some things open. Plus signs
are optional both for the number and the exponent. A leading
zero might be, too. In your case, it is a leading blank that went
to carriage control. A leading zero in F format output is also
optional.
The one I quote from F66 is that on input blanks are treated as
zeros. With blanks treated as zeros, and the decimal point in
the position specified, it should not come out .005712.
-- glen
|
| |
|
| |
 |
Richard Maine

|
Posted: 2004-1-24 6:19:00 |
Top |
fortran >> How to convert characters to number
glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
>>>I am 100% sure that blanks count as zero...[in f66]
> Well, that is mostly because I have a copy of the F66 standard
> and not the F77 standard. It may be that it changed, though
> I wouldn't expect the blanks are zeros part to change.
Now that you mention it....It has been a long time, but memories
now come back. Yes, that is a difference between f66 and f77,
though the difference is in a subtle place, which causes strange
consequences, as I now recall running into.
In f66, as you note, blanks were treated as zeros (on formatted
input - that's what we are talking about, so I won't keep repeating
the qualification).
F77 added the BLANK= specifier to the OPEN statement and it
defaults to BLANK='NULL'. I recall thinking this a big improvement
for integer input. You no longer got 420 instead of 42 if you
accidentally were off a column in your typing....or as 4200000000
if you typed it left-justified instead of right. Of course, for
reals, I always used an explicit decimal point, so it didn't matter.
The subtlety is that the specification that the default is null
is in the definition of the OPEN statement. If you didn't use an
OPEN statement, then this didn't apply and nothing in the
standard specified the default. I initially failed to notice
this subtlety and got bitten when I ported some of my codes to
a compiler that defaulted to blanks zero for internal reads
(which don't involve an OPEN statement). At the time I thought
it quite quirky that the compiler made the default different
for reads without an OPEN. I now suppose that was probably for
f66 compatibility. So strictly speaking, f77 doesn't specify
whether f66 code (without OPENs) is compatabile with f66 in this
regard or not.
Later versions of the standard specified that the default for
other kinds of input was also null, just like it was for an
OPEN statement. I'd have to do some extra reading to track
down exactly when this additional specification was added
(might have been done in 2 stages).
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
|
| |
|
| |
 |
James Giles

|
Posted: 2004-1-24 6:22:00 |
Top |
fortran >> How to convert characters to number
glen herrmannsfeldt wrote:
...
> Well, that is mostly because I have a copy of the F66 standard
> and not the F77 standard. It may be that it changed, though
> I wouldn't expect the blanks are zeros part to change.
Last time I looked, the F77 standard was online at www.fortran.com.
It's in html and not pdf, but it's all there. There's also a plain text
version which I find harder to read.
Try http://www.fortran.com/F77_std/rjcnf.html
--
J. Giles
|
| |
|
| |
 |
Mark Crispin

|
Posted: 2004-1-24 6:56:00 |
Top |
fortran >> How to convert characters to number
On Fri, 23 Jan 2004, glen herrmannsfeldt wrote:
> You didn't ask where Mark Crispin was running TOPS-20, though.
That's because it's well known that I have a TOPS-20 system on the
Internet 24/7.
I also own two working 2020 systems, but I generally don't run them any
more given that Lingling is about 75 times faster and runs an extended
addressing monitor with TCP/IP.
I am aware of at least 19 TOPS-20 systems on the Internet today, of which
9 are operational 24/7 on the open Internet and 3 more are probably
operational but are inaccessible behind firewalls.
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
|
| |
|
| |
 |
James Giles

|
Posted: 2004-1-24 7:06:00 |
Top |
fortran >> How to convert characters to number
Richard Maine wrote:
...
> F77 added the BLANK= specifier to the OPEN statement and it
> defaults to BLANK='NULL'. I recall thinking this a big improvement
> for integer input. You no longer got 420 instead of 42 if you
> accidentally were off a column in your typing....or as 4200000000
> if you typed it left-justified instead of right. Of course, for
> reals, I always used an explicit decimal point, so it didn't matter.
Indeed, the F77 standard is ambiguous about whether the implied
decimal point is placed before or after the blanks are removed
and the remaining digits are right justified in the field. That
gave me fits when implementing this. I placed the implied
decimal point before compressing out the spaces. Apparently
that's not the way other implementations chose to work.
The F90, F95, and proposed F2kV standards all retain this
ambiguity, thought maybe there's an interp. I still think it
works more naturally if the implied point is placed before
the spaces are removed. It's better, of course, if the user
supplies an explicit decimal point.
--
J. Giles
|
| |
|
| |
 |
dfevans

|
Posted: 2004-1-24 15:08:00 |
Top |
fortran >> How to convert characters to number
In article <Pine.WNT.4.60.0401231449080.3648@Tomobiki-Cho.CAC.Washington.EDU>,
Mark Crispin <MRC@CAC.Washington.EDU> wrote:
>On Fri, 23 Jan 2004, glen herrmannsfeldt wrote:
>> You didn't ask where Mark Crispin was running TOPS-20, though.
>
>That's because it's well known that I have a TOPS-20 system on the
>Internet 24/7.
>
Furthermore, at least in a.s.pdp10, it's common knowledge that these
days it's not terribly difficult to do such a thing.
>I am aware of at least 19 TOPS-20 systems on the Internet today, of which
>9 are operational 24/7 on the open Internet and 3 more are probably
>operational but are inaccessible behind firewalls.
>
Lame as it may seem, my "big" PC is too loud to keep running 24/7.
This means that I only have my own TOPS-20 sandbox intermittently.
--
David Evans dfevans@bbcr.uwaterloo.ca
Ph.D. Candidate, Computer/Synth Junkie http://bbcr.uwaterloo.ca/~dfevans/
University of Waterloo "Default is the value selected by the composer
Ontario, Canada overridden by your command." - Roland TR-707 Manual
|
| |
|
| |
 |
jmfbahciv

|
Posted: 2004-1-24 18:52:00 |
Top |
fortran >> How to convert characters to number
In article <AIgQb.107023$sv6.517374@attbi_s52>,
glen herrmannsfeldt <gah@ugcs.caltech.edu> wrote:
>Mark Crispin wrote:
>
>(snip)
>
>>>I am 100% sure that blanks count as zero, so that can't
>>>be right. Very strange.
>
>> You said that you were referring to the F66 specification. The TOPS-20
>> FORTRAN-20 compiler is F77.
>
>Well, that is mostly because I have a copy of the F66 standard
>and not the F77 standard. It may be that it changed, though
>I wouldn't expect the blanks are zeros part to change.
>
>> The UNIX f77 compiler more or less agrees with TOPS-20 FORTRAN-20; or
>> rather, it reads them as the same numeric values but the output is
>> slightly different.
>
>> I had to change the ACCEPT 10 and TYPE 10 statements to READ (5,10) and
>> WRITE (6,10) before f77 would compile it, but the results are nearly
>> identical:
>>
>> % a.out
>> 57 12
>> .005712 .000000
>> %
>
>> I can understand why TOPS-20 FORTRAN-20 deleted a space in the output of
>> the first number; it's obviously carriage control. I don't understand
why
>> UNIX f77 added two spaces.
>
>> I have long since forgotten enough of my Fortran to know whether F15.6
>> should output with a zero in front of the decimal point. After all, it
>> has been 30 years!!!!
>
>The standard, at least F66, leaves some things open. Plus signs
>are optional both for the number and the exponent. A leading
>zero might be, too. In your case, it is a leading blank that went
>to carriage control. A leading zero in F format output is also
>optional.
>
>The one I quote from F66 is that on input blanks are treated as
>zeros.
There's a difference between leading blanks and embedded blanks.
> .. With blanks treated as zeros, and the decimal point in
>the position specified, it should not come out .005712.
But, in this case, the blank input between the 57 and 12 was
treated as a null.
/BAH
Subtract a hundred and four for e-mail.
|
| |
|
| |
 |
| |
 |
Index ‹ fortran |
- Next
- 1
- what '#ifdef' means in a fortran code?hi all
i get a fortran source code in which has some words like '#ifdef',
'#elseif', '#endif' . i don't know what it means , when compile with
Compaq Visual Fortran, it just warns that 'Warning: Bad #
preprocessor line #ifdef' and so on . anyone could explain them?
thanks .
zhang
- 2
- fortran and unit testingI'm wondering what unit testing strategies people use with Fortran. I
am deciding whether to try using some kind of existing framework or just
write my unit tests directly in Fortran. I have found two unit testing
frameworks for Fortran: Fruit and Funit. Neither seem that great in my
opinion and would require my project to have additional dependencies. I
was thinking about just adding unit tests directly in my Fortran source
code directly and using compiler directives to conditionally compile
them and run them. Right now I have three paths I can follow.
1. Use a scripting language unit-testing framework like Funit
2. Write all unit tests in Fortran in separate files and compile
conditionally.
3. Write all unit tests in Fortran and place unit tests for a
particular routine in the same file as the routine. Compile conditionally.
Any comments concerning the pros/cons of the above methods would be
appreciated. Also, personal experiences and other ideas would be great.
Thanks,
John
- 3
- How to Make F77 Program Faster (g95 compiler) ??Hello;
Realizing that Fortran programming skills are not within my grasp, I
thought and for a good reason to post my question in this discussion
group seeking your expert advice.
1) One of my F77 programs is about 14,000 lines and applies 10s of
special functions and many more complex computational methods
developed over the years (in the aero field).
2) The program currently takes about 4 hrs to run on a 3.2 GHz m/c to
advance the solution from 0.0 to 0.01. (Couple of years ago, the same
program would have taken probably 24 hrs to run, and in the 90s,
probably 2 weeks!!!)
3) The program works perfectly, except for one last bug, as always
seems to be the case!
4) The program calls one particular procedure 10,000s of times. The
routine is about 100 lines. If I'm able to make that procedure a
centi- or milli-second faster, then I would probably save 0.5 hrs or
more in runtime on the same m/c.
5) What I'm looking for is some general guidelines on what I should or
shouldn't do. For example, where applicable, should I:
i. reduce the number of statements ??
use: x2 = a + b + c*d
rather than: x1 = a + b
x2 = x1 + c*d
or is it still a 2-operation process ??
ii. pass info in data blocks rather than in subprogram
arguments ??
iii. limit the use of nested DO loops and nested IF statements ??
iv. clean-up the routine from all unnecessary (and necessary!!)
comments ??
v. etc. ??
6) It's a bit risky at this point to change program structure, data
types, data flow, etc.
Thank you kindly for your expert suggestions.
Monir
- 4
- Interaction of generic names and assumed size argumentsI would like to set up a generic name along the lines of...
INTERFACE generic_foo
MODULE PROCECURE foo_int, foo_logical !...
END INTERFACE
SUBROUTINE foo_int(array_bar, n)
INTEGER, DIMENSION(*) :: array_bar
INTEGER n
! ...
END SUBROUTINE
SUBROUTINE foo_logical(array_bar, n)
LOGICAL, DIMENSION(*) :: array_bar
INTEGER N
! ...
END SUBROUTINE
...
INTEGER, ALLOCATABLE, DIMENSION(:,:,:) real_bar
...
CALL generic_foo(real_bar(1,1,z), n)
Actually attempting this yields compiler errors (ifort 8.1) about there
being no matching specific subroutine. Replacing with a call to the
intended specific routine works.
Is it actually possible to do something along these lines, or do generic
procedures and assumed size arguments just not play nicely together?
- 5
- running a second *.exe while one *.exe is running using Lahey fortranI am using using Window 2000 operating system and running *.exe using
SYSTEM ( ) subroutine using Lahey fortran. While *.exe is running
(takes about 2-3 hours to complete runs), I also want other operations
using fortran program like running another exe or editing some test
files. How do I write fortran program for this situation?
------------------------------------------------------------------
program
call system (*.exe)
c this runs *.exe my *.exe takes 2-3 hours to run, how do I run
another *2.exe or perform
c other operations (like re-writing an text file, or deleating a
text file while *.exe is running?
end program
-----------------------------------------------------------------------------
- 6
- REAL :: Pi=3.& 14159Hi,
is this standard Fortran, if not, should this be rejected or is this a
useful extension?
REAL :: Pi=3.&
14159
write(6,*) Pi
END
xlf90, nag, g95 and ifc reject, ifort and pgf90 accept
Thanks,
Joost
- 7
- TRANSFER on derived types (was Re: small numerical differences in floating point result between wintel and Sun/SPARC)James Van Buskirk wrote:
> "James Giles" <email***@***.com> wrote in message
> news:RMOvd.126249$email***@***.com...
>
>
>> Result Value. If the physical representation of the result has
>> the same length as that of SOURCE, the physical representation
>> of the result is that of SOURCE. If the physical representation
>> of the result is longer than that of SOURCE, the physical
>> representation of the leading part is that of SOURCE and
>> the remainder is processor dependent. If the physical
>> representation of the result is shorter than that of SOURCE,
>> the physical representation of the result is the leading part
>> of SOURCE. If D and E are scalar variables such that the
>> physical representation of D is as long as or longer than that
>> of E, the value of TRANSFER (TRANSFER (E, D), E) shall
>> be the value of E. IF D is an array and E is an array of rank one,
>> the value of TRANSFER (TRANSFER (E, D), E, SIZE (E))
>> shall be the value of E.
>
>
> Gack! I was afraid of this... shows what I get for not participating
> in the standardization process... What if E is type default INTEGER
> and D is type default REAL so that they have the same storage size
> and the bit pattern of E corresponds to an SNAN? There have been
> popular processors that by default silently convert SNANs to QNANs
> when passing them through their FPUs. This would change one bit
> of E in this case. Also what if D has holes in it, like a user-
> defined type with internal padding for component alignment or
> external padding for aligning arrays of the structure? Or how
> about 80-bit REALs on x86 machines which occupy 128 bits in memory
> leaving 48 bits of 'hole'?
>
Well blow me down -- I was just about to point out that TRANSFER doesn't
work for derived types, but I thought that I ought to check that this is
the case. And lo and behold, it *does* work for derived types. Anyone
care to explain any restrictions or whatnot that I might need to know
about this new-found functionality?
cheers,
Rich
--
Dr Richard H D Townsend
Bartol Research Institute
University of Delaware
[ Delete VOID for valid email address ]
- 8
- Reference to derived type element by index?I have a derived type, e.g.
type circle_datatype
real :: radius
real :: x
real :: y
real :: z
character(len=*) :: circle_label
endtype circle_datatype
type(circle_datatype) :: circle
and want to refer to the individual elements via some indexing scheme,
say in this example I want to change the value of circle%radius I would
use index #1, or the z-coordinate I would use #4. Is there some method
by which this is possible?
I think IDL has a system for this, such that circle.radius can be
referenced by circle.(0), but I really need Fortran's horsepower for
this code!
- 9
- Random number production in HP Fortran 90I'd like to be able to generate a different sequence
of pseudo-random numbers each time I run my code,
using the HP intrinsics rand() and gran() to produce
uniform and gaussian random numbers. As far as I
can see, calling srand(i) with a different value of i each
time ought to do it (at least, if I'm not misunderstanding
the documentation). But when I try it, I always get
the same "random" numbers.
Here's my test code:--
program rand_test
integer:: i
call system_clock(i)
call srand(i)
print *, i, gran(), rand()
end program rand
Using this, I always get just the same results from gran()
and rand(), though i is changing.
I also tried inputting the value for i with
program rand_test2
integer:: i
print*, "seed? "
read*, i
call srand(i)
print *, i, gran(), rand()
end program rand_test2
which also always gives the same result (though it's different
from that of the first program.
Can anybody let me know what I'm doing wrong?
(And how to fix it!)
Thanks,
Rob.
- 10
- Portability of the construction "character(len=len(name))" ...Hello,
someone using a library I wrote reported a problem with the (a) Salford
Fortran 95
compiler regarding this construction:
subroutine usestring(name)
character(len=*) :: name
character(len=len(name)) :: copy
...
end subroutine
It would seem that this compiler does not like that.
As far as I know this is correct Fortran. I do not have access to this
compiler (and I do not know what version he is using), but is that
something
others have encountered too? Are there more (recent enough) compilers
that complain about this?
Regards,
Arjen
- 11
- Segmentation Fault without write?Hi,
I've got a confusing problem with my Fortran code.
I've written a subroutine and when I finished it (sure it is workung) I
removed all of those statements/output/check lines like write(*,*) 'got
it until here' .
The result => Segmentation fault.
I narrowed it down to a single write statement. Her comes my source
code:
SUBROUTINE multipass(webx,n)
c this routine returns the x position (array) of each web according
c to the blade center line "chamber lines" based on the given
c percentages for the passage area
c-----------------------------------------------------------------------
implicit none
double precision webx(*)
integer n
double precision dx,dy,PI,xab(2),yab(2),vecx(5),polyarea,
& vecy(5),xc(300),yc(300),Ax(300),Ay(300),Ar(11),
& At,dxa,dya,dxw,dyw,pda,maxpda,abs,totarea,
& area(11),pdas(11),amax,interp1
integer maxxi,minxi,j,i,secs,veci(5),n,k,count,maxcount
PARAMETER (PI=3.14159265358979)
INCLUDE 'bldobj.f'
maxxi=1
minxi=B.ncl
dx=cos(PI/180.0d0*B.alphaw)
dy=sin(PI/180.0d0*B.alphaw)
c---------- GENERATE GRAPH FOR AREA VS. X/L
j=0
write(*,*) 'length ',B.ncl
do i=B.ncl,2,-1
c write(*,*) 'x ',B.xcl(i),' y ',B.ycl(i)
xab(1)=B.xcl(i)-dx
xab(2)=B.xcl(i)+dx
yab(1)=B.ycl(i)-dy
yab(2)=B.ycl(i)+dy
call curveintersec(B.xi,B.yi,B.ni,xab,yab,secs,
& veci,vecx,vecy,5)
if (secs.gt.1.and.veci(1).gt.1.and.(veci(1)+2).lt.B.ncl) then
j=j+1
n=0
do k=veci(1)-1,veci(2)+2
n=n+1
xc(n)=B.xi(k)
yc(n)=B.yi(k)
enddo
xc(1)=(vecx(2)+vecx(1))/2.0d0
xc(2)=vecx(1)
yc(1)=(vecy(2)+vecy(1))/2.0d0
yc(2)=vecy(1)
xc(n)=xc(1)
xc(n-1)=vecx(2)
yc(n)=yc(1)
yc(n-1)=vecy(2)
Ax(j)=B.xcl(i)
Ay(j)=polyarea(xc,yc,n)
endif
enddo
j=j+1
Ax(j)=B.xcl(1)
Ay(j)=polyarea(B.xi,B.yi,B.ni)
c---------- MAKE AN INITIAL GUESS
c for each passage area (passno == webno+1)
c assuming therefor a web thickness of zero
At=Ay(j)
do i=1,B.webno+1
if (i.eq.1) then
c first passage
Ar(i)=B.webarea(i)/100.0d0*At
webx(i)=interp1(Ay,Ax,Ar(i),j)
elseif (i.eq.B.webno+1) then
c last passage not treated, because percentages results
c from all other passages
else
c middle passage
Ar(i)=B.webarea(i)/100.0d0*At+Ar(i-1)
webx(i)=interp1(Ay,Ax,Ar(i),j)
endif
enddo
dxa=cos(PI/180.0d0*B.alphaw)
dya=sin(PI/180.0d0*B.alphaw)
dxw=0.5d0*B.dweb*sin(PI/180.0d0*B.alphaw)
dyw=0.5d0*B.dweb*cos(PI/180.0d0*B.alphaw)
dx=(B.xcl(maxxi)-B.xcl(minxi))/2000.0d0
c percetual delta area
pda=0.05d0
c max pda currently present (set out of the way to enter loop)
maxpda=100.0d0
count=0
maxcount=1000
do while (count.le.maxcount.and.abs(maxpda).gt.pda)
count=count+1
totarea=0.0d0
do i=1,B.webno+1
if (i.eq.1) then
c first passage
area(i)=interp1(Ax,Ay,webx(i)-dxw,j)
elseif (i.eq.B.webno+1) then
c last passage
area(i)=At-interp1(Ax,Ay,webx(i-1)+dxw,j)
else
c middle passage
area(i)=interp1(Ax,Ay,webx(i)-dxw,j)
+ -interp1(Ax,Ay,webx(i-1)+dxw,j)
endif
totarea=totarea+area(i)
enddo
c determine each percentage delta
do i=1,B.webno+1
pdas(i)=area(i)/totarea*100.0d0 - B.webarea(i)
enddo
C HERE IS THE CRITICAL WRITE STATEMENT
write(*,*) 'HALLO'
maxpda=amax(pdas,B.webno+1)
do i=1,B.webno
if (pdas(i).gt.pda) then
webx(i)=webx(i)-dx
elseif (pdas(i).lt.(-1.0d0)*pda) then
webx(i)=webx(i)+dx
endif
enddo
c end of while
enddo
if (count.ge.maxcount) then
write(*,*)'(Web positioning) hit max iteration, accuracy not met'
endif
return
end
The Structure B is defined like that in the INCLUDE and got values
(sure):
STRUCTURE / BLADESEC /
DOUBLE PRECISION xo(300),yo(300),zo(300)
DOUBLE PRECISION xi(300),yi(300),zi(300)
DOUBLE PRECISION xcl(150),ycl(150)
DOUBLE PRECISION webarea(11)
INTEGER no,ni,ncl
INTEGER ewano,stpi,istpi,webno,passno,teh
DOUBLE PRECISION dwall,dweb,alphaw,minterad,tol,tehd
END STRUCTURE
COMMON / TBLADE / B
RECORD / BLADESEC / B
Anybody now the secret of the realation ship between WRITE and
segmentation Fault?
TIA
Julian
P.S.:I've got the hole program logic written in another laguage and
just transscript it.
- 12
- equivalent of fftw_r2r_kind in fortran 90Hi all
In the advanced interface of fftw3 library, on pg 31 of the manual
fftw_plan fftw_plan_many_r2r(int rank, const int *n, int howmany, double
*in, const int *inembed, int istride, int idist, double *out, const int
*onembed, int ostride, int odist, const fftw_r2r_kind *kind, unsigned
flags);
I know that equivalent of fftw_plan is integer*8. On the same grounds
how to declare the "const fftw_r2r_kind *" variable in fortran 90? Is it
an integer*8 array or is it character array?
For my case the rank is 2 And I want to do FFTW_REDFT00 in both the
directions.
I read the documentation but they did not discuss anything about it.
thanks for any input
raju
- 13
- limitations on function referenceAFAIK if f(x) is an array-valued function one can't access an element
by saying (for example)
PRINT *,f(x)(1)
but must be more long-winded, by declaring an array g of the same shape
as f, with elements of the same type, and then saying
g = f(x)
PRINT *,g(1)
If f is of type character one could also imagine 3 pairs of parentheses:
PRINT *,f(x)(1:2)(3:4)
to print characters 3 and 4 of elements 1 and 2 of the array f(x)
Does some possible ambiguity I haven't thought of prevent allowing
that sort of thing?
-- John Harper, School of Mathematics, Statistics and Computer Science,
Victoria University, PO Box 600, Wellington 6140, New Zealand
e-mail email***@***.com phone (+64)(4)463 5341 fax (+64)(4)463 5045
- 14
- why sometimes contain a subroutine in a module?why not just type a subroutine and call it in the main program but first
type a module and contain a subroutine in that module.
when use the subroutine, use the module first and then call the subroutine?
it doesnt seems to be efficient.
Thanks!
- 15
- Google says Robin Vowels mis-postsI snipped my view of Google's tree for this topic, had notepad remove
the html and below is the result. Isnt Google a independent view?
The tree is surprising, it says message 5 by Robin is NOT in response
to message 1 in the thread. However my OE tree indicates it is in
reply to to message 1.
However, either tree indicates some mis-posting, whether once or twice
is
uncertain at this time.
------------------------------------------------
1 David Frank Jul 5, 2003 <- topic begins in comp.lang.pl1
\-2 Tom Lake Jul 5, 2003
|-3 David Frank Jul 5, 2003
\-4 James J. Weinkam Jul 5, 2003
5 robin Jul 6, 2003 <- cross-post to CLF, NOT a reply to
1
|-6 David Frank Jul 6, 2003
| |-7 Bill Turner, WB4ALM Jul 6, 2003
| | \-8 David Frank Jul 7, 2003
| \-9 Glen Herrmannsfeldt Jul 7, 2003
| \-10 David Frank Jul 7, 2003
| \-11 Glen Herrmannsfeldt Jul 7, 2003
\-12 bendel boy Jul 6, 2003
13 robin Jul 7, 2003 <- NOT a reply to 6
\-14 Tim Jul 7, 2003
|
|
|