|Apr21-06, 10:29 PM||#1|
Hi , I need help to write a code for this function(fortran 77):
integer function delete(id, list, n) where
• delete returns 0 if the deletion was successful, -1 if the list is empty, and -2 if the user is not currently in the list.
•id is the integer identification number of the user.
•list is the integer array from which the id is to be removed.
•n is the current length of the list.
I tried this:
integer function delete(id,list,n) integer i,indexe,j do 20 i=1,n if(list(i).EQ.id) then indexe=i 20 continue do 30 j= indexe,n list(i) = list(i+1) 30 continue n = n-1 return 0
My second problem is that How to check if that array is empty?
please can someone help me?
Thank you for the time.
|Similar discussions for: Fortran help|
|Help with Fortran 90||Programming & Comp Sci||0|
|fortran help||Programming & Comp Sci||7|
|Fortran v.s. Visual Fortran||Programming & Comp Sci||0|
|I need some fortran 90 help||Programming & Comp Sci||1|
|help with fortran plz||Engineering, Comp Sci, & Technology Homework||1|