Trying to use a logical as an array index
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 87 articles for 0.038 sec
Re: Trying to use a logical as an array index     

Group: comp.lang.fortran · Group Profile · Search for Trying to use a logical as an array index in comp.lang.fortran
Author: robin
Date: Jul 12, 2008 07:24

...a93f-405eb147cad4@c65g2000hsa.googlegroups.com... I am trying to print out True and False instead... like to use a logical as an array index, but can't in F90. I have tried the following, and it works on .../= -1) program fred integer iii logical truth CHARACTER(LEN=5), DIMENSION(-1:... a CHARACTER function that receives a LOGICAL argument and which returns the string ...
Show full article (0.92Kb) · Show article thread
Re: Trying to use a logical as an array index     

Group: comp.lang.fortran · Group Profile · Search for Trying to use a logical as an array index in comp.lang.fortran
Author: e p chandler
Date: Jul 10, 2008 08:30

...> like to use a logical as an array index, but can't in F90.  I have tried the... -1)   program fred   integer iii   logical truth   CHARACTER(LEN=5), DIMENSION(-1... writing an indicator function instead: logical p,q character*5 e ... character*5 function e(p) logical p if (p) then e ... the mathematical formalism which maps logical propositions or truth values to ...
Show full article (1.29Kb) · Show article thread
Trying to use a logical as an array index     

Group: comp.lang.fortran · Group Profile · Search for Trying to use a logical as an array index in comp.lang.fortran
Author: ferrad
Date: Jul 10, 2008 07:32

I am trying to print out True and False instead of T and F. I would like to use a logical as an array index, but can't in F90. I have tried the following, and it works on Intel v10, but will ...always -1? (I don't want to get an array bounds error if .true. /= -1) program fred integer iii logical truth CHARACTER(LEN=5), DIMENSION(-1:0), PARAMETER :: ...
Show full article (0.61Kb)
Re: Trying to use a logical as an array index     

Group: comp.lang.fortran · Group Profile · Search for Trying to use a logical as an array index in comp.lang.fortran
Author: Paul van Delst
Date: Jul 11, 2008 09:23

... than logical variables, and use that integer value as an array index. I ..., parameter :: false=0, true=1 logical, parameter :: int2logical(false:true)=(/.false.,.true./) and use these parameters in my code rather ... of the compiler, and the int2logical(:) array gives you a quick conversion from ... Depending on the application, I sometimes use the integer parameters "yes" and "...
Show full article (1.68Kb) · Show article thread
Re: Trying to use a logical as an array index     

Group: comp.lang.fortran · Group Profile · Search for Trying to use a logical as an array index in comp.lang.fortran
Author: Ron Shepard
Date: Jul 11, 2008 08:01

... than logical variables, and use that integer value as an array index. I ...integer, parameter :: false=0, true=1 logical, parameter :: int2logical(false:true)=(/.false.,.true./) and use these parameters in my code rather ... of the compiler, and the int2logical(:) array gives you a quick conversion from ... Depending on the application, I sometimes use the integer parameters "yes" and "no...
Show full article (1.34Kb) · Show article thread
Re: Trying to use a logical as an array index     

Group: comp.lang.fortran · Group Profile · Search for Trying to use a logical as an array index in comp.lang.fortran
Author: James Van Buskirk
Date: Jul 10, 2008 17:52

...\pointer_arith>type LOGICALtest2.f90 module funcs use ISO_C_BINDING implicit none contains subroutine table_row(x) logical(C_BOOL) x integer(C_INT8_T) y logical(...not just through creating potentially undefined LOGICAL(1) variable states via TRANSFER. ...fully conformant, nicht? Try thinking about the program using negative logic, this can...
Show full article (6.85Kb) · Show article thread
Re: Trying to use a logical as an array index     

Group: comp.lang.fortran · Group Profile · Search for Trying to use a logical as an array index in comp.lang.fortran
Author: James Giles
Date: Jul 13, 2008 13:49

...question about this (James van Buskirk's) code. This code is not from the programs I referenced in the current thread. It's just another example of the wacky methods that are being used to attack me personally and professionally. Notice that it seems to have been quite effective in that it has given you the impression that I wrote this rather than the fact that it's a straw ...
Show full article (1.36Kb) · Show article thread
Re: Trying to use a logical as an array index     

Group: comp.lang.fortran · Group Profile · Search for Trying to use a logical as an array index in comp.lang.fortran
Author: James Van Buskirk
Date: Jul 13, 2008 11:01

... basic question about this (James van Buskirk's) code. This code is not from the programs I referenced in the current thread. It's just another example of the wacky methods that are being used to attack me personally and professionally. Notice that it seems to have been quite effective in that it has given you the impression that I wrote this rather than the fact that it's a straw man ...
Show full article (0.78Kb) · Show article thread
Re: Trying to use a logical as an array index     

Group: comp.lang.fortran · Group Profile · Search for Trying to use a logical as an array index in comp.lang.fortran
Author: James Van Buskirk
Date: Jul 11, 2008 17:23

...in a barrel: C:\gcc_mingw64a\clf\derived_allocatable>type derived_allocatable.f90 module funcs use ISO_C_BINDING implicit none type DA integer, allocatable :: int(:) real, ... nullify(z) end subroutine sub1 end module funcs program derived_allocatable use ISO_C_BINDING use funcs implicit none type(DA), pointer :: x1 integer i ...
Show full article (2.62Kb) · Show article thread
Re: Trying to use a logical as an array index     

Group: comp.lang.fortran · Group Profile · Search for Trying to use a logical as an array index in comp.lang.fortran
Author: James Giles
Date: Jul 11, 2008 15:24

... get back on topic. Followed by a program that's non-standard: integer(C_INT8_T) input logical(C_BOOL) output ... open(10,file='temp.dat',access='stream',status='replace') write(10) input ...='delete') He writes a value declared to be an INTEGER and reads it as a LOGICAL. That's a violation. The only valid conclusion is that the implementation did whatever the ...
Show full article (1.42Kb) · Show article thread
1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9 · next