swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I trust in Objective-C?


From: Gary Polhill
Subject: Re: How can I trust in Objective-C?
Date: Wed, 10 Mar 1999 13:24:58 +0000

Fabio Mascelloni wrote:
> 
> 
> Excuse me if I wasn't much clear: local_y is declared as a pointer to float 
> and
> allocated through a calloc(2,sizeof(float));
> The strange fact is that its values are printed correctly if it is passed as a
> parameter to a function,and are wrong if they are printed directly!

What happens when you compile and run the code I sent with the last
message? If you declare local_y as a pointer to float, then that
corresponds to ptr. The print method of the pointer class prints the
contents of ptr directly and still prints the right value. I guess what
I am really asking is why my code doesn't reproduce the problem.

I compiled it on a Sun SPARC with Solaris 2.6 and Swarm 1.4.1,
and on a PC with NT 4 and Swarm 1.4.1. All give the same output.

Gary

-- 

Macaulay Land Use Research Institute, Craigiebuckler, Aberdeen. AB15 8QH
Tel: +44 (0) 1224 318611               Email: address@hidden

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]