Dimitar Kolev Wrote:

Sorry I need an edit button. It is 12:30 a.m. here.

> Different example:
> 
> class plane
> {
>     bool fly = false;
>     bool fly()
>     {
>          if (fly == false) return false;
> 
>          // code for flying.
>          // If it breaks for some reason
>          return false;
> 
>          // else return that everything is okay.
> 
>          return true;
>     }
> }
> 
> class pilot
> {
>       if (myPlane.fly) 
>          myPlane.fly;
> }
> 
> So this becomes:
> 
> class plane
> {
>     bool @fly = false;
>     bool fly()
>     {
>          if (@fly == false) return false;
> 
>          // code for flying.
>          // If it breaks for some reason
>          return false;
> 
>          // else return that everything is okay.
> 
>          return true;
>     }
> }
>

class pilot
{
       plane @myPlane;

       plane myPlane()
       {
              @myPlane = new plane();
       }

       bool fly()
       {
              if (@myPlane == null)
                    myPlane();

              if (@mypl...@fly == false)
                  @mypl...@fly = true;

              @myPlane.fly;
       }
}

By the way I do not care if you are harsh or not. I just want this resolved.

Reply via email to