Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: zmth
  • Content: Threads
  • Order by date
  1. zmth

    type precedence protocol... gfortran

    i have read that when have mixed types such as integer and real in for example r=a/i the result will be real*4 but now suppose have set integer*8 a,r then will r=a/i be of precision real*8 or will it just be of default precision real*4 ?
  2. zmth

    anyone else had this error with gfortran ?

    integer*8 lisf(17) nn=3 lisf=[1,1,2,(0,i=4,4*nn+5)] print*,lisf end But on the screen the entries after the 4th are invalid numbers,NOT all 0's. And on other occasions of similar types it does not even print out the entries >4 and if have more steps,assigning loops etc. get run time errors...
  3. zmth

    accuracy in gfortran

    if all the variables at first are integer isn't integer multiplication supposed to be exact ? Even though i am getting very large numbers(as long as not overflow): anyway at the end i will have to divide a floating point number by the integer(s). There are several steps and at first i just...
  4. zmth

    gfortran initialized allocated arrays

    if for example array is allocatable say of one dimension and already allocated then is it automatically set all elements to 0? I had always been doing array=0 which i have also seen in the literature of other people doing In fact i have been doing so for all arrays of any dimensions real or...
  5. zmth

    gfortran.exe 9/10/2015 932kb

    all the sudden strange behavior using above compiler. For illustration My source file is named U1.f95 with the following code ------------------ open (1, file="modinc395.t",status="old",position="rewind",& action="read",iostat=ierror) read(1,'(2(i3))') nps,npmx ; print*,"nps,npmx",nps,npmx...
  6. zmth

    gfortran undefined reference error

    integer:: ls1(2,4),mlis(2,4) lenrec=1 nps=4 write(1,*)"ls1(1,1)",ls1(1,1) write(1,*)"ls1(1,:)",ls1(1,:) i=1 do while(ls1(1,i)==lsl(2,i).and.i<nps+1) i=i+1 enddo end First of all it ignores the write statements if omit the do while... As it is it gives 'undefined reference error...
  7. zmth

    bogus segmentation invalid memory reference from gfortran

    Has anyone had this problem with the gfortran compiler call rr(1,1) end recursive subroutine rr(j,k) if(j>3) then print*,k else k=k*j call rr(j+1,k) endif end Clearly everything is well defined and should not be getting any run time errors such as 'segmentation... invalid...
  8. zmth

    integer do variable ending value ?

    In an integer do loop such as do i=lower,iupper .... ; enddo More specifically with an integer do loop variable default step 1 whose upper limit is atleast as great as the lowerwill it always be the case that after the loop normally exits, eg assuming nothing in the loop such that one may...
  9. zmth

    what happen to gfortran compiler

    i have used gfortran.exe uses.f95 and use gfortran.exe myfile.f95 such as this aLL files that worked perfectly and compiled no problem prior now get message. eg Get error :\Simply Fortran 2>gfortran.exe uses.f95 his version of c:\Simply Fortran 2\gfortran.exe is not compatible with the...
  10. zmth

    gfortran ignores common

    integer*1 n1,nps common n1,nps n1=5 nps=4 call try end subroutine try print*,"nps",nps,"n1",n1 end NOw it should printout 4 for nps and 5 for n1 but it does NOT why ?
  11. zmth

    error in gfortran ignores common

    integer*1 n1,nps common n1,nps n1=5 nps=4 call try end subroutine try print*,"nps",nps,"n1",n1 end BUT it does NOT printout 4 for nps nor 5 for n1 what is wrong ? Also how do i get this post to printout the code in the box for code ? that others are able to do ?
  12. zmth

    extraneous error compiling in Gfortran

    common lena,np,nps np=2;nps=3; lena=0 i=1;i1=0 ; call jkz(i,i1) end recursive subroutine jkz(i9,ir) common lena,np,nps print*,"i9",i9," ir",ir if (i9<nps+1) then ; if (i9<nps) then ; if (i9<nps-1) then ; do ii=0,min(np,2*np-ir) m1=i9+1;m2=ir+ii;call jkz(m1,m2) ; enddo; else ; do...
  13. zmth

    Segmentation fault - invalid memory reference. Error

    The following compiles ok with no error messages but gives Segmentation fault - invalid memory reference. when run the executable module inc integer*1:: i,j,nps integer*1,allocatable::ib(:) type mixed ; integer*1,allocatable :: ib(:) ; real val ; end type mixed type(mixed), allocatable ...
  14. zmth

    get compiler error when should not

    i want to pass variable array size to subroutine. the following will illustrate integer*1 i,is ,j,j1,j2,m1,m2,np,npmx,nps integer*1,allocatable::ilisin(:),ils(:) common nps,npmx,np npmx=2;nps=3 allocate(ilisin(nps),ils(2*nps-min(3,nps))) call wigd(1,ilisin,0,ils) end subroutine...
  15. zmth

    is it a problem with my computer,compiler or what ?

    I need to have a mixed type array with short integer*1 values first and a real value last. I read all the examples and am doing everything correct but it refuses to work !! This is only a simple trial example to try first. Later i will need to have much more than just 11 integer values and need...

Part and Inventory Search

Back
Top