Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > if Restrict_Fun...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 5625 of 5694
Post > Topic >>

if Restrict_Func /= null confusion

by ma740988@[EMAIL PROTECTED] Mar 30, 2008 at 01:58 PM

Well folks its been at least 4 years since I've perused and/or written
Ada source.  That aside I'm perusing source code written in Ada.   So
consider:

-- used to restrict a variable within a range
-- for example: -PI to +PI
type Restrict_Function is access function (X: Real4) return Real4;

type Filt_Data is
  record
     Restrict_Func   : Restrict_Function ;

  end record ;


   --  within a procedure we have
  Fdata             : Filt_Data;
  Restrict_Func : Restrict_Function := FData.Restrict_Func ;

  if  Restrict_Func /= null then
   -- stuff
  endif

At issue:  I'm not following the conditional logic 'if (Restrict_Func /
= null)'.  Not understanding the impetus behind the check for null.




 4 Posts in Topic:
if Restrict_Func /= null confusion
ma740988@[EMAIL PROTECTED  2008-03-30 13:58:02 
Re: if Restrict_Func /= null confusion
"jimmaureenrogers@[E  2008-03-30 14:34:31 
Re: if Restrict_Func /= null confusion
Ludovic Brenta <ludovi  2008-03-30 23:36:02 
Re: if Restrict_Func /= null confusion
Robert A Duff <bobduff  2008-03-30 17:37:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 9:58:20 CDT 2008.