replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Programming question
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Programming question

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Fri Jun 08, 2012 4:32 pm    Post subject: Programming question Reply with quote

This is a general programming question not a fortran question.Can anyone help?


Please can anyone explain me the ,menaing of this statement?

Are function parameters explicitly verified in the code?


Can anyone explain through an example? I was eading a check list for a good code and found this.

Christy
Back to top
View user's profile Send private message
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Fri Jun 08, 2012 10:20 pm    Post subject: Reply with quote

I suspect it means that you should use a language or compiler that is capable of checking function arguments are used correctly. It is always good practice to get the compiler to check this if you can.
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Sat Jun 09, 2012 2:52 am    Post subject: Reply with quote

This could also be from a list of things to be done when coding a function, eg does ASIN have code to check if the argument is in the range -1 to +1, otherwise report an error. Asks the question : How should a function report an error ?
Back to top
View user's profile Send private message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Sat Jun 09, 2012 8:20 am    Post subject: Reply with quote

Could this mean the following?

I have a function with x number of arguments.

SO, the programmer should debug and see that every argument has a realistic value.It might so happen that he might have sent arguments to the function from the calling routine which are not used in the function and hence have junk values as they are not declared.

Could this also be an interpretation of that sentence:

Quote:
Are function parameters explicitly verified in the code?


Christy
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2923
Location: South Pole, Antarctica

PostPosted: Sun Jun 10, 2012 5:34 am    Post subject: Reply with quote

People mostly answered your question but you can try to find more answers in this table which summarizes what compilers check in subroutines and functions.
http://www.polyhedron.com/pb05-win32-diagnose0html
Back to top
View user's profile Send private message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: N�rnberg, Germany

PostPosted: Sun Jun 10, 2012 10:48 am    Post subject: Reply with quote

Very interesting presentation of the available compilers! When it comes to checking FTN95 is the best - and this is may experience as well.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Sun Jun 10, 2012 9:16 pm    Post subject: Reply with quote

... and if Polyhedron printed the compile time, that might be an interesting statistic.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group